Enable target_dir to be passed as command-line parameter

This commit is contained in:
Dave Smith 2010-06-22 10:25:42 -06:00
parent 127483f32b
commit c32d26f509

View file

@ -100,6 +100,8 @@ sys_tuple(ReltoolConfig) ->
%% found, use the name of the release as the default target directory.
%%
target_dir(ReltoolConfig) ->
case rebar_config:get_global(target_dir, undefined) of
undefined ->
case lists:keysearch(target_dir, 1, ReltoolConfig) of
{value, {target_dir, TargetDir}} ->
filename:absname(TargetDir);
@ -111,6 +113,9 @@ target_dir(ReltoolConfig) ->
false ->
filename:absname("target")
end
end;
TargetDir ->
filename:absname(TargetDir)
end.
%%