Created
August 10, 2010 05:50
-
-
Save spullara/516764 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
| public class BagCheckCLI { | |
| private static final String API = System.getenv("BAGCHECK_API"); | |
| private static final Pattern PATH_PATTERN = Pattern.compile("\\{(.*?)\\}"); | |
| @Argument(alias = "d") | |
| private static Boolean debug = false; | |
| @Argument(alias = "u") | |
| private static String user = System.getenv("BAGCHECK_USER"); | |
| @Argument(alias = "p") | |
| private static String password = System.getenv("BAGCHECK_PASSWORD"); | |
| @Argument(alias = "a") | |
| private static String api = API == null ? "http://bagcheck.com/v1" : API; | |
| public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException, IOException { | |
| try { | |
| List<String> commands = Args.parse(BagCheckCLI.class, args); | |
| int cnum = 0; | |
| if (commands.size() == cnum || commands.get(cnum).equals("")) { | |
| helpServices(services); | |
| System.exit(1); | |
| } | |
| .... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment