From 411d703666e8a8b4fca4ad6e7beff069fb64d0d4 Mon Sep 17 00:00:00 2001 From: Luis Rascao Date: Thu, 12 Jun 2014 14:05:35 +0100 Subject: bootstrap now accepts --help usage flag --- bootstrap | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index f6aa6cc..e14b0e0 100755 --- a/bootstrap +++ b/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; -- cgit v1.2.1 From 41095e73e2b58ac134e300236df247989bc485c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Rasc=C3=A3o?= Date: Thu, 26 Jun 2014 23:29:26 +0100 Subject: fix indentation issues --- bootstrap | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap index e14b0e0..cc2a751 100755 --- a/bootstrap +++ b/bootstrap @@ -7,10 +7,10 @@ main(Args) -> true -> usage(), halt(0); - false -> + false -> ok - end, - + end, + %% Get a string repr of build time Built = build_time(), @@ -99,9 +99,9 @@ main(Args) -> usage() -> io:format("Usage: bootstrap [OPTION]...~n"), - io:format(" force=1\t unconditional build~n"), - io:format(" debug\t add debug information~n"). - + io:format(" force=1 unconditional build~n"), + io:format(" debug add debug information~n"). + is_otp(OtpInfo, Regex) -> case re:run(OtpInfo, Regex, [{capture, none}]) of match -> true; -- cgit v1.2.1