Created
February 22, 2018 07:43
-
-
Save TachibanaKaoru/4ffa5dda9b86b4f0ef1a02e064ba34e9 to your computer and use it in GitHub Desktop.
change markdown to preview mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/swift | |
import Foundation | |
let env = ProcessInfo.processInfo.environment | |
let manager = FileManager.default | |
let fileNakami = """ | |
<?xml version="1.0" encoding=\"UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<array/> | |
</plist> | |
""" | |
if let pathValue = env["XcodeProjectPath"] as? String{ | |
var fileURL = URL(fileURLWithPath: pathValue) | |
fileURL.appendPathComponent(".xcodesamplecode.plist") | |
try! fileNakami.write(to: fileURL, atomically: true, encoding: String.Encoding.utf8) | |
} | |
if let pathValue = env["XcodeWorkspacePath"] as? String{ | |
var fileURL = URL(fileURLWithPath: pathValue) | |
fileURL.appendPathComponent(".xcodesamplecode.plist") | |
try! fileNakami.write(to: fileURL, atomically: true, encoding: String.Encoding.utf8) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment