瀏覽代碼

bootstrap now accepts --help usage flag

pull/3/head
Luis Rascao 11 年之前
父節點
當前提交
411d703666
共有 1 個文件被更改,包括 13 次插入0 次删除
  1. +13
    -0
      bootstrap

+ 13
- 0
bootstrap 查看文件

@ -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;

Loading…
取消
儲存