     }
 }
 
-func run(command: String) {
-    print(command)
+func shell(command: String) -> String {
+    let fp = popen(command, "r")
+    var buf = Array<CChar>(count: 128, repeatedValue: 0)
+    var result = ""
+    while fgets(&buf, CInt(buf.count), fp) != nil,
+          let str = String.fromCString(buf) {
+              result.appendContentsOf(str)
+    }
+    fclose(fp)
+    return result
+}
+
+func run(command: String, silent: Bool = false) {
+    if !silent { print(command) }
     system(command)
 }
 

    print("  target ... production|sandbox")
}

func main(task task: Task, target: Target) {
    switch task {
    case .Config:  target.config()

    case Build   = "build"
    case Test    = "test"
    case Clean   = "clean"
    case Version = "next-version"
}

enum Target: String {
