diff options
author | Luis Rascao <luis.rascao@gmail.com> | 2014-06-12 14:05:35 +0100 |
---|---|---|
committer | Luis Rascao <luis.rascao@gmail.com> | 2014-06-12 14:05:35 +0100 |
commit | 411d703666e8a8b4fca4ad6e7beff069fb64d0d4 (patch) | |
tree | 4c9ecfcffe50c772ba0fb8d377851a2d92b1c7c1 /bootstrap | |
parent | 908028858fc4376c02951dd1e524008d24c453f1 (diff) |
bootstrap now accepts --help usage flag
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -3,6 +3,14 @@ %% ex: ft=erlang ts=4 sw=4 et main(Args) -> + case lists:member("--help", Args) of + true -> + usage(), + halt(0); + false -> + ok + end, + %% Get a string repr of build time Built = build_time(), @@ -89,6 +97,11 @@ main(Args) -> "Place this script anywhere in your path\n" "and you can use rebar to build OTP-compliant apps.\n"). +usage() -> + io:format("Usage: bootstrap [OPTION]...~n"), + io:format(" force=1\t unconditional build~n"), + io:format(" debug\t add debug information~n"). + is_otp(OtpInfo, Regex) -> case re:run(OtpInfo, Regex, [{capture, none}]) of match -> true; |