Created
July 6, 2014 10:16
-
-
Save seoh/5a4af7a5620c294ef27b to your computer and use it in GitHub Desktop.
SwimpleServer
This file contains hidden or 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/env xcrun --sdk macosx10.10 swift -i | |
import Foundation | |
println("Usage: \n\t\t\(NSURL(string:__FILE__).lastPathComponent) -- [options]") | |
// #TODO options | |
var opt = Dictionary<String, String>() | |
for arg in Process.arguments { | |
let array = arg.componentsSeparatedByString("=") | |
let key: String? = array[0] | |
let value: String? = array[1] | |
println(key, value) | |
} | |
// .map{ $0.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet()) } | |
// .filter{ countElements($0) > 0 } | |
println(opt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment