mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Enable target_dir to be passed as command-line parameter
This commit is contained in:
parent
127483f32b
commit
c32d26f509
1 changed files with 15 additions and 10 deletions
|
@ -100,6 +100,8 @@ sys_tuple(ReltoolConfig) ->
|
||||||
%% found, use the name of the release as the default target directory.
|
%% found, use the name of the release as the default target directory.
|
||||||
%%
|
%%
|
||||||
target_dir(ReltoolConfig) ->
|
target_dir(ReltoolConfig) ->
|
||||||
|
case rebar_config:get_global(target_dir, undefined) of
|
||||||
|
undefined ->
|
||||||
case lists:keysearch(target_dir, 1, ReltoolConfig) of
|
case lists:keysearch(target_dir, 1, ReltoolConfig) of
|
||||||
{value, {target_dir, TargetDir}} ->
|
{value, {target_dir, TargetDir}} ->
|
||||||
filename:absname(TargetDir);
|
filename:absname(TargetDir);
|
||||||
|
@ -111,6 +113,9 @@ target_dir(ReltoolConfig) ->
|
||||||
false ->
|
false ->
|
||||||
filename:absname("target")
|
filename:absname("target")
|
||||||
end
|
end
|
||||||
|
end;
|
||||||
|
TargetDir ->
|
||||||
|
filename:absname(TargetDir)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
Loading…
Reference in a new issue