diff options
author | Juhani Rankimies <juhani@juranki.com> | 2010-10-26 07:19:30 +0300 |
---|---|---|
committer | Dave Smith <dizzyd@dizzyd.com> | 2010-10-27 11:39:12 -0600 |
commit | fd5ebe69a4d4028908247f6d669eb38254613269 (patch) | |
tree | f963d76d95a46fda14d6d491ecdc14cabcdc06c1 /src/rebar_reltool.erl | |
parent | 75fc2378bf006b5660ce2115561d36bea10e04c5 (diff) |
Port rebar_file_utils to Windows
Modify rm_rf and cp_r to work when {win32,_} = os:type().
Simplify rm_rf to only accept one filename, directoryname or wildcard.
Add unit tests to ensure a similar behaviour on windows and unix.
Thanks to tuncer for guidance and feedback.
Diffstat (limited to 'src/rebar_reltool.erl')
-rw-r--r-- | src/rebar_reltool.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rebar_reltool.erl b/src/rebar_reltool.erl index 024870e..b8e1095 100644 --- a/src/rebar_reltool.erl +++ b/src/rebar_reltool.erl @@ -281,7 +281,7 @@ execute_overlay([{copy, In, Out} | Rest], Vars, BaseDir, TargetDir) -> false -> ok = filelib:ensure_dir(OutFile) end, - rebar_utils:sh(?FMT("cp -R ~p ~p", [InFile, OutFile]), []), + rebar_file_utils:cp_r([InFile], OutFile), execute_overlay(Rest, Vars, BaseDir, TargetDir); execute_overlay([{template, In, Out} | Rest], Vars, BaseDir, TargetDir) -> InFile = render(filename:join(BaseDir, In), Vars), |