Created
February 2, 2009 22:39
-
-
Save imbriaco/57142 to your computer and use it in GitHub Desktop.
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
private static Options addCommandLineOptions () | |
{ | |
Option help = new Option( "help", "print this message" ); | |
Option folder = OptionBuilder.withArgName("folder") | |
.hasArg (true) | |
.withDescription ("Name of folder to upload. Only top level objects that are not folders will be uploaded.") | |
.create ("folder"); | |
Option file = OptionBuilder.withArgName("file") | |
.hasArg (true) | |
.withDescription ("Name of file to upload to .") | |
.create ("file"); | |
Option container = OptionBuilder.withArgName("container") | |
.hasArg (true) | |
.withDescription ("Name of container to place objects into.") | |
.create ("container"); | |
Option zip = new Option ("z","zip", false, "Compress the object being placed into . This option can be used with other options e.g. -tar"); | |
// Option tar = new Option ("t","tar", false, "Create a tar of the folder. Using this option without a -folder has no effect !"); | |
Option download = new Option ("d","download", false, "Copy files from to the local system. Must be used in conjunction to -folder -file -container"); | |
Options options = new Options(); | |
options.addOption(folder); | |
options.addOption(file); | |
options.addOption(zip); | |
options.addOption(help); | |
options.addOption(container); | |
//options.addOption(tar); | |
options.addOption(download); | |
return options; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment