mirror of
https://github.com/correl/rebar.git
synced 2024-11-15 03:00:18 +00:00
bootstrap now accepts --help usage flag
This commit is contained in:
parent
908028858f
commit
411d703666
1 changed files with 13 additions and 0 deletions
13
bootstrap
13
bootstrap
|
@ -3,6 +3,14 @@
|
||||||
%% ex: ft=erlang ts=4 sw=4 et
|
%% ex: ft=erlang ts=4 sw=4 et
|
||||||
|
|
||||||
main(Args) ->
|
main(Args) ->
|
||||||
|
case lists:member("--help", Args) of
|
||||||
|
true ->
|
||||||
|
usage(),
|
||||||
|
halt(0);
|
||||||
|
false ->
|
||||||
|
ok
|
||||||
|
end,
|
||||||
|
|
||||||
%% Get a string repr of build time
|
%% Get a string repr of build time
|
||||||
Built = build_time(),
|
Built = build_time(),
|
||||||
|
|
||||||
|
@ -89,6 +97,11 @@ main(Args) ->
|
||||||
"Place this script anywhere in your path\n"
|
"Place this script anywhere in your path\n"
|
||||||
"and you can use rebar to build OTP-compliant apps.\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) ->
|
is_otp(OtpInfo, Regex) ->
|
||||||
case re:run(OtpInfo, Regex, [{capture, none}]) of
|
case re:run(OtpInfo, Regex, [{capture, none}]) of
|
||||||
match -> true;
|
match -> true;
|
||||||
|
|
Loading…
Reference in a new issue