diff options
author | Tristan Sloughter <[email protected]> | 2014-06-24 19:19:21 -0500 |
---|---|---|
committer | Tristan Sloughter <[email protected]> | 2014-06-24 19:19:21 -0500 |
commit | 0efab6868011ee6a9d0ed0e65bd745e14fc909ea (patch) | |
tree | 57c4045f082476b2eb0998dc3417562dbbac41d6 /src | |
parent | 82d0a9571fe30bec1722849bd9b9988856a95ec0 (diff) | |
download | relx-0efab6868011ee6a9d0ed0e65bd745e14fc909ea.tar.gz relx-0efab6868011ee6a9d0ed0e65bd745e14fc909ea.tar.bz2 relx-0efab6868011ee6a9d0ed0e65bd745e14fc909ea.zip |
add include-erts cmd line arg, same as the config variable
Diffstat (limited to 'src')
-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(_, _) -> []. |