mirror of
https://github.com/correl/rebar.git
synced 2024-11-27 11:09:55 +00:00
Look for dirs named erts-vsn when setting up spec for copying files
This commit is contained in:
parent
66fa90ce6c
commit
96e9a2a521
1 changed files with 7 additions and 1 deletions
|
@ -246,8 +246,14 @@ spec_copy_overlay([F | Rest], Dir, Acc) ->
|
|||
{ok, Info} = file:read_file_info(Filename),
|
||||
case Info#file_info.type of
|
||||
directory ->
|
||||
%% If this directory has the special name of "erts-vsn", we are going to replace "vsn" with the
|
||||
%% actual erts vsn for the output directory name
|
||||
case filename:basename(Filename) of
|
||||
"erts-vsn" -> OutDir = "erts-" ++ erlang:system_info(version);
|
||||
OutDir -> ok
|
||||
end,
|
||||
{ok, Files} = file:list_dir(Filename),
|
||||
Entry = {create_dir, filename:basename(Filename), spec_copy_overlay(Files, Filename, [])},
|
||||
Entry = {create_dir, OutDir, spec_copy_overlay(Files, Filename, [])},
|
||||
spec_copy_overlay(Rest, Dir, [Entry | Acc]);
|
||||
regular ->
|
||||
Entry = {copy_file, filename:basename(F), filename:absname(Filename)},
|
||||
|
|
Loading…
Reference in a new issue