diff options
author | Dave Smith <dizzyd@dizzyd.com> | 2010-01-09 05:35:04 -0700 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2010-01-09 05:35:04 -0700 |
commit | 407486bc62ac0d604bccf323bb4755e7a018a19d (patch) | |
tree | c698c1abe1d1eed42d15f5cfced3e3ba13f228a2 /src/rebar_core.erl | |
parent | 49aef70f9b5a778d9430c4167ea469b1ebb8f71d (diff) | |
parent | 1e6d92a3a64036982368c23a592a9a49046adb04 (diff) |
Merging mainline
Diffstat (limited to 'src/rebar_core.erl')
-rw-r--r-- | src/rebar_core.erl | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl index bc58d72..88dbde8 100644 --- a/src/rebar_core.erl +++ b/src/rebar_core.erl @@ -128,28 +128,26 @@ set_global_flag(Options, Flag) -> %% print help/usage string %% help() -> - Jobs = rebar_config:get_jobs(), - io:format( -" -Usage: rebar [-h] [-v] [-f] [-j <jobs>] [key=value,...] <command,...> - - -h, --help Show the program options - -v, --verbose Be verbose about what gets done - -f, --force Force - -j, --jobs Number of concurrent workers a command may use. Default: ~B -", [Jobs]). + OptSpecList = option_spec_list(), + getopt:usage(OptSpecList, escript:script_name(), + "[var=value,...] <command,...>", + [{"var=value", "rebar global variables (e.g. force=1)"}, + {"command", "Command to run (e.g. compile)"}]). %% %% options accepted via getopt %% option_spec_list() -> + Jobs = rebar_config:get_jobs(), + JobsHelp = io_lib:format( + "Number of concurrent workers a command may use. Default: ~B", + [Jobs]), [ %% {Name, ShortOpt, LongOpt, ArgSpec, HelpMsg} {help, $h, "help", undefined, "Show the program options"}, {verbose, $v, "verbose", undefined, "Be verbose about what gets done"}, {force, $f, "force", undefined, "Force"}, - {jobs, $j, "jobs", integer, - "Number of concurrent workers a command may use."} + {jobs, $j, "jobs", integer, JobsHelp} ]. %% |