From 6c90453d79cd1e8cf35cb4f6ad4ee51d7be39e50 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 24 Jan 2013 21:03:53 -0800 Subject: convert relcool to take a config as a opt argument adds `-c ` or `--config ` instead of passing the config file as an argument. --- src/relcool.erl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/relcool.erl') 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(). -- cgit v1.2.3