Skip to content

Commit a4d6efa

Browse files
committed
Rename commands source files.
1 parent 20678a3 commit a4d6efa

File tree

4 files changed

+11243
-11245
lines changed

4 files changed

+11243
-11245
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import Foundation
2+
import SystemPackage
3+
4+
extension SystemCommand.dsclCommand.readCommand: Output {
5+
public func properties(_ p: Platform) async throws -> [(key: String, value: String)] {
6+
let output = try await self.output(p)
7+
guard let output else { return [] }
8+
9+
var props: [(key: String, value: String)] = []
10+
for line in output.components(separatedBy: "\n") {
11+
if case let comps = line.components(separatedBy: ": "), comps.count == 2 {
12+
props.append((key: comps[0], value: comps[1]))
13+
}
14+
}
15+
return props
16+
}
17+
}
18+
19+
extension SystemCommand.lipoCommand.createCommand: Runnable {}
20+
21+
extension SystemCommand.pkgbuildCommand: Runnable {}
22+
23+
extension SystemCommand.getentCommand: Output {
24+
public func entries(_ platform: Platform) async throws -> [[String]] {
25+
let output = try await output(platform)
26+
guard let output else { return [] }
27+
28+
var entries: [[String]] = []
29+
for line in output.components(separatedBy: "\n") {
30+
entries.append(line.components(separatedBy: ":"))
31+
}
32+
return entries
33+
}
34+
}
35+
36+
extension SystemCommand.gitCommand.logCommand: Output {}
37+
extension SystemCommand.gitCommand.diffindexCommand: Runnable {}
38+
extension SystemCommand.gitCommand.initCommand: Runnable {}
39+
extension SystemCommand.gitCommand.commitCommand: Runnable {}
40+
41+
extension SystemCommand.tarCommand.createCommand: Runnable {}
42+
extension SystemCommand.tarCommand.extractCommand: Runnable {}
43+
44+
extension SystemCommand.swiftCommand.packageCommand.resetCommand: Runnable {}
45+
extension SystemCommand.swiftCommand.packageCommand.cleanCommand: Runnable {}
46+
extension SystemCommand.swiftCommand.packageCommand.initCommand: Runnable {}
47+
extension SystemCommand.swiftCommand.sdkCommand.installCommand: Runnable {}
48+
extension SystemCommand.swiftCommand.sdkCommand.removeCommand: Runnable {}
49+
extension SystemCommand.swiftCommand.buildCommand: Runnable {}
50+
51+
extension SystemCommand.makeCommand: Runnable {}
52+
extension SystemCommand.makeCommand.installCommand: Runnable {}
53+
54+
extension SystemCommand.stripCommand: Runnable {}
55+
56+
extension SystemCommand.sha256sumCommand: Output {}
57+
58+
extension SystemCommand.productbuildCommand: Runnable {}
59+
60+
extension SystemCommand.gpgCommand.importCommand: Runnable {}
61+
extension SystemCommand.gpgCommand.verifyCommand: Runnable {}
62+
63+
extension SystemCommand.pkgutilCommand.checksignatureCommand: Runnable {}
64+
extension SystemCommand.pkgutilCommand.expandCommand: Runnable {}
65+
extension SystemCommand.pkgutilCommand.forgetCommand: Runnable {}
66+
67+
extension SystemCommand.installerCommand: Runnable {}

0 commit comments

Comments
 (0)