aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJordan Wilberding <[email protected]>2014-06-25 11:57:29 +0200
committerJordan Wilberding <[email protected]>2014-06-25 11:57:29 +0200
commitbcb2b8050310a2c49db52cc14216ce1708c85cc1 (patch)
tree57c4045f082476b2eb0998dc3417562dbbac41d6 /src
parent82d0a9571fe30bec1722849bd9b9988856a95ec0 (diff)
parent0efab6868011ee6a9d0ed0e65bd745e14fc909ea (diff)
downloadrelx-bcb2b8050310a2c49db52cc14216ce1708c85cc1.tar.gz
relx-bcb2b8050310a2c49db52cc14216ce1708c85cc1.tar.bz2
relx-bcb2b8050310a2c49db52cc14216ce1708c85cc1.zip
Merge pull request #202 from tsloughter/include_erts_cli
add include-erts cmd line arg, same as the config variable
Diffstat (limited to 'src')
-rw-r--r--src/relx.erl2
-rw-r--r--src/rlx_cmd_args.erl11
2 files changed, 13 insertions, 0 deletions
diff --git a/src/relx.erl b/src/relx.erl
index 6216ab1..1364538 100644
--- a/src/relx.erl
+++ b/src/relx.erl
@@ -199,6 +199,8 @@ opt_spec_list() ->
"Verbosity level, maybe between 0 and 3"},
{dev_mode, $d, "dev-mode", boolean,
"Symlink the applications and configuration into the release instead of copying"},
+ {include_erts, $i, "include-erts", string,
+ "If true include a copy of erts used to build with, if a path include erts at that path. If false, do not include erts"},
{override, $a, "override", string,
"Provide an app name and a directory to override in the form <appname>:<app directory>"},
{config, $c, "config", {string, ""}, "The path to a config file"},
diff --git a/src/rlx_cmd_args.erl b/src/rlx_cmd_args.erl
index f8aebf9..5df9392 100644
--- a/src/rlx_cmd_args.erl
+++ b/src/rlx_cmd_args.erl
@@ -269,6 +269,17 @@ create(paths, Opts) ->
create(dev_mode, Opts) ->
DevMode = proplists:get_value(dev_mode, Opts, false),
{dev_mode, DevMode};
+create(include_erts, Opts) ->
+ case proplists:get_value(include_erts, Opts, true) of
+ IncludeErts when IncludeErts =:= true
+ ; IncludeErts =:= "true" ->
+ {include_erts, true};
+ IncludeErts when IncludeErts =:= false
+ ; IncludeErts =:= "false" ->
+ {include_erts, false};
+ Erts when is_list(Erts) ->
+ {include_erts, Erts}
+ end;
create(_, _) ->
[].