diff options
author | Dave Smith <dizzyd@dizzyd.com> | 2010-01-14 07:46:00 -0500 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2010-01-14 07:46:00 -0500 |
commit | 96e9a2a521dcd86865ac5bfff7ed4c96e70945f1 (patch) | |
tree | 7e4d85de9139fffe5d680b6c795008ede1f040a6 /src | |
parent | 66fa90ce6c1e0607a01a3ea041acf1e0ae140636 (diff) |
Look for dirs named erts-vsn when setting up spec for copying files
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_reltool.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rebar_reltool.erl b/src/rebar_reltool.erl index d16bc3f..960166c 100644 --- a/src/rebar_reltool.erl +++ b/src/rebar_reltool.erl @@ -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)}, |