diff options
author | Eric Merritt <[email protected]> | 2014-01-18 08:47:35 -0800 |
---|---|---|
committer | Eric Merritt <[email protected]> | 2014-01-18 08:47:35 -0800 |
commit | a88c42415ec2dc304a23a261206dbd9fe79824ba (patch) | |
tree | 0bd5848504ded7a667570e052505cd5b11697da1 | |
parent | 4f9729df661bc0b4818592cf9c4f2db4b8025d2b (diff) | |
parent | 9cb9bcebbe5d4e2888fd80a0d1c894a3b8e1ea14 (diff) | |
download | relx-a88c42415ec2dc304a23a261206dbd9fe79824ba.tar.gz relx-a88c42415ec2dc304a23a261206dbd9fe79824ba.tar.bz2 relx-a88c42415ec2dc304a23a261206dbd9fe79824ba.zip |
Merge pull request #111 from tsloughter/config_output_dir
add config option for output_dir, currently only a cmd arg
-rw-r--r-- | src/rlx_prv_config.erl | 2 | ||||
-rw-r--r-- | src/rlx_state.erl | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/rlx_prv_config.erl b/src/rlx_prv_config.erl index aa2e79c..0379c2f 100644 --- a/src/rlx_prv_config.erl +++ b/src/rlx_prv_config.erl @@ -189,6 +189,8 @@ load_terms({vm_args, VmArgs}, {ok, State}) -> {ok, rlx_state:vm_args(State, filename:absname(VmArgs))}; load_terms({sys_config, SysConfig}, {ok, State}) -> {ok, rlx_state:sys_config(State, filename:absname(SysConfig))}; +load_terms({output_dir, OutputDir}, {ok, State}) -> + {ok, rlx_state:output_dir(State, filename:absname(OutputDir))}; load_terms({overlay_vars, OverlayVars}, {ok, State}) -> CurrentOverlayVars = rlx_state:get(State, overlay_vars), NewOverlayVars0 = list_of_overlay_vars_files(OverlayVars), diff --git a/src/rlx_state.erl b/src/rlx_state.erl index bc4af5b..2d0493b 100644 --- a/src/rlx_state.erl +++ b/src/rlx_state.erl @@ -27,6 +27,7 @@ log/1, actions/1, output_dir/1, + output_dir/2, lib_dirs/1, add_lib_dirs/2, overrides/1, @@ -186,6 +187,10 @@ log(#state_t{log=LogState}) -> output_dir(#state_t{output_dir=OutDir}) -> OutDir. +-spec output_dir(t(), Directory::file:filename()) -> t(). +output_dir(State, Directory) -> + State#state_t{output_dir=Directory}. + -spec lib_dirs(t()) -> [file:name()]. lib_dirs(#state_t{lib_dirs=LibDir}) -> LibDir. |