use of org.apache.commons.cli.HelpFormatter in project zm-mailbox by Zimbra.
the class ZoneInfo2iCalendar method usage.
private static void usage(String errmsg) {
if (errmsg != null) {
System.err.println(errmsg);
}
String usage = "zmtzdata2ical <options> [tzdata source files ...]";
Options opts = sOptions;
PrintWriter pw = new PrintWriter(System.err, true);
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp(pw, formatter.getWidth(), usage, null, opts, formatter.getLeftPadding(), formatter.getDescPadding(), null);
pw.flush();
}
use of org.apache.commons.cli.HelpFormatter in project zm-mailbox by Zimbra.
the class MimeDetect method usage.
private static void usage(Options opts) {
new HelpFormatter().printHelp(MimeDetect.class.getSimpleName() + " [options] file", opts);
System.exit(2);
}
use of org.apache.commons.cli.HelpFormatter in project zm-mailbox by Zimbra.
the class LocalConfigUpgrade method usage.
static void usage(String error) {
if (error != null)
System.out.println("Error: " + error);
Options opts = getAllOptions();
PrintWriter pw = new PrintWriter(System.out, true);
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp(pw, formatter.getWidth(), getCommandUsage(), null, opts, formatter.getLeftPadding(), formatter.getDescPadding(), null);
pw.flush();
if (error != null) {
System.exit(1);
} else {
System.exit(0);
}
}
use of org.apache.commons.cli.HelpFormatter in project zm-mailbox by Zimbra.
the class ChartUtil method usage.
private static void usage(Options opts, String msg) {
if (msg != null)
System.err.println(msg);
String invocation = "Usage: zmstat-chart -c <arg> -s <arg> -d <arg> [options]";
PrintWriter pw = new PrintWriter(System.err, true);
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp(pw, formatter.getWidth(), invocation, null, opts, formatter.getLeftPadding(), formatter.getDescPadding(), null);
pw.flush();
System.exit(1);
}
use of org.apache.commons.cli.HelpFormatter in project zm-mailbox by Zimbra.
the class AttributeManagerUtil method usage.
private static void usage(String errmsg) {
if (errmsg != null) {
logger.error(errmsg);
}
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("AttributeManagerUtil [options] where [options] are one of:", options);
System.exit((errmsg == null) ? 0 : 1);
}
Aggregations