Skip to content

Instantly share code, notes, and snippets.

@spullara
Created August 10, 2010 05:50
Show Gist options
  • Select an option

  • Save spullara/516764 to your computer and use it in GitHub Desktop.

Select an option

Save spullara/516764 to your computer and use it in GitHub Desktop.
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