diff options
author | Eric <[email protected]> | 2013-01-24 21:03:53 -0800 |
---|---|---|
committer | Eric <[email protected]> | 2013-01-24 21:03:53 -0800 |
commit | 6c90453d79cd1e8cf35cb4f6ad4ee51d7be39e50 (patch) | |
tree | dec64fc42b184decdeb92a75805a88da622bd72d /src/relcool.erl | |
parent | e02d59de76a2f0c0e0311f22e4779652a1375ee9 (diff) | |
download | relx-6c90453d79cd1e8cf35cb4f6ad4ee51d7be39e50.tar.gz relx-6c90453d79cd1e8cf35cb4f6ad4ee51d7be39e50.tar.bz2 relx-6c90453d79cd1e8cf35cb4f6ad4ee51d7be39e50.zip |
convert relcool to take a config as a opt argument
adds `-c <config-file>` or `--config <config-file>` instead of passing
the config file as an argument.
Diffstat (limited to 'src/relcool.erl')
-rw-r--r-- | src/relcool.erl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/relcool.erl b/src/relcool.erl index 42923c4..83886c5 100644 --- a/src/relcool.erl +++ b/src/relcool.erl @@ -48,7 +48,7 @@ main(Args) -> {ok, State} -> run_relcool_process(rcl_state:caller(State, command_line)); Error={error, _} -> - report_error(rcl_state:caller(rcl_state:new([], []), + report_error(rcl_state:caller(rcl_state:new([], undefined), command_line), Error) end. @@ -106,8 +106,9 @@ do(RootDir, RelName, RelVsn, Goals, LibDirs, LogLevel, OutputDir, Overrides, Con {output_dir, OutputDir}, {lib_dirs, LibDirs}, {root_dir, RootDir}, - {log, rcl_log:new(LogLevel)}], - Config), + {log, rcl_log:new(LogLevel)}, + {config, Config}], + release), run_relcool_process(rcl_state:caller(State, api)). @@ -127,6 +128,7 @@ opt_spec_list() -> "Disable the default system added lib dirs (means you must add them all manually"}, {log_level, $V, "verbose", {integer, 1}, "Verbosity level, maybe between 0 and 2"}, + {config, $c, "config", string, "The path to a config file"}, {root_dir, $r, "root", string, "The project root directory"}]. -spec format_error(Reason::term()) -> iolist(). |