     fatalError("No arguments given")
 }
 
-let dict = NSProcessInfo.processInfo().environment
+let dict = ProcessInfo.processInfo.environment
 let srcRoot = Process.arguments[1]
 let builtProductsDir = Process.arguments[2]
 


let dirs = ["swift", "swift/macosx/x86_64"]
for dir in dirs {
    mkdir(NSURL(fileURLWithPath: builtProductsDir).URLByAppendingPathComponent(dir).path!)
}

let frameworkPath: String
switch dict["CONFIGURATION"]!.lowercaseString {
case "debug":
	frameworkPath = "/build/Ninja-DebugAssert/swift-macosx-x86_64/lib"
case "release":

    fatalError("Unsupported build configuration")
}

func from(_ path: String) -> String {
	return URL(fileURLWithPath: srcRoot).appendingPathComponent(frameworkPath).appendingPathComponent(path).path
}
print("Copying debug files")
for path in files {
    copy(from: from(path), to: URL(fileURLWithPath: builtProductsDir).appendingPathComponent(path).path)
}
for path in paths {
    copy(from: from(path.from), to: URL(fileURLWithPath: builtProductsDir).appendingPathComponent(path.to).path)
}
