From 940f9c232ba6c2896991d83ed8c5e296e470c5a0 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Thu, 31 Dec 2009 18:00:02 +0100 Subject: Enhanced option parsing with new getopt and made rebar more user friendly --- src/rebar_otp_app.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rebar_otp_app.erl') diff --git a/src/rebar_otp_app.erl b/src/rebar_otp_app.erl index e9bf1d3..3fc3606 100644 --- a/src/rebar_otp_app.erl +++ b/src/rebar_otp_app.erl @@ -63,11 +63,11 @@ install(Config, File) -> true -> %% Already exists -- check for force=1 global flag and only %% continue if it's set - case rebar_config:get_global(force, "0") of - "0" -> + case rebar_config:get_global(force, false) of + false -> ?ERROR("~s already exists. Installation failed.\n", [AppId]), ?FAIL; - "1" -> + true -> ?WARN("~s already exists, but forcibly overwriting.\n", [AppId]) end; false -> -- cgit v1.1 From 9a8015f2d78394e3652d2b7720442b77948412f6 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Thu, 31 Dec 2009 19:42:53 +0100 Subject: Added vi modeline/emacs local variables to file headers --- src/rebar_otp_app.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/rebar_otp_app.erl') diff --git a/src/rebar_otp_app.erl b/src/rebar_otp_app.erl index 3fc3606..a5d1046 100644 --- a/src/rebar_otp_app.erl +++ b/src/rebar_otp_app.erl @@ -1,3 +1,5 @@ +%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*- +%% ex: ts=4 sw=4 et %% ------------------------------------------------------------------- %% %% rebar: Erlang Build Tools -- cgit v1.1 From 0817dec7ca3a24955cc8f08fb359bf0f77ae1f4d Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Fri, 1 Jan 2010 00:08:00 +0100 Subject: Rolled back getopt to restore custom variables --- src/rebar_otp_app.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/rebar_otp_app.erl') diff --git a/src/rebar_otp_app.erl b/src/rebar_otp_app.erl index a5d1046..6f4935f 100644 --- a/src/rebar_otp_app.erl +++ b/src/rebar_otp_app.erl @@ -65,11 +65,11 @@ install(Config, File) -> true -> %% Already exists -- check for force=1 global flag and only %% continue if it's set - case rebar_config:get_global(force, false) of - false -> + case rebar_config:get_global(force, "0") of + "0" -> ?ERROR("~s already exists. Installation failed.\n", [AppId]), ?FAIL; - true -> + "1" -> ?WARN("~s already exists, but forcibly overwriting.\n", [AppId]) end; false -> -- cgit v1.1