diff options
author | Jordan Wilberding <[email protected]> | 2014-06-25 11:57:29 +0200 |
---|---|---|
committer | Jordan Wilberding <[email protected]> | 2014-06-25 11:57:29 +0200 |
commit | bcb2b8050310a2c49db52cc14216ce1708c85cc1 (patch) | |
tree | 57c4045f082476b2eb0998dc3417562dbbac41d6 | |
parent | 82d0a9571fe30bec1722849bd9b9988856a95ec0 (diff) | |
parent | 0efab6868011ee6a9d0ed0e65bd745e14fc909ea (diff) | |
download | relx-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
-rw-r--r-- | src/relx.erl | 2 | ||||
-rw-r--r-- | src/rlx_cmd_args.erl | 11 |
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(_, _) -> []. |