mirror of
https://github.com/correl/rebar.git
synced 2024-11-27 11:09:55 +00:00
Remove unused functions from rebar_file_utils
mkdir_p/1 and ln_sf/2.
This commit is contained in:
parent
ff5581c44a
commit
75fc2378bf
1 changed files with 0 additions and 16 deletions
|
@ -27,9 +27,7 @@
|
||||||
-module(rebar_file_utils).
|
-module(rebar_file_utils).
|
||||||
|
|
||||||
-export([rm_rf/1,
|
-export([rm_rf/1,
|
||||||
mkdir_p/1,
|
|
||||||
cp_r/2,
|
cp_r/2,
|
||||||
ln_sf/2,
|
|
||||||
delete_each/1]).
|
delete_each/1]).
|
||||||
|
|
||||||
-include("rebar.hrl").
|
-include("rebar.hrl").
|
||||||
|
@ -42,25 +40,11 @@ rm_rf(Target) ->
|
||||||
[] = os:cmd(?FMT("rm -rf ~s", [Target])),
|
[] = os:cmd(?FMT("rm -rf ~s", [Target])),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
mkdir_p(Target) ->
|
|
||||||
[] = os:cmd(?FMT("mkdir -p ~s", [Target])),
|
|
||||||
ok.
|
|
||||||
|
|
||||||
cp_r(Sources, Dest) ->
|
cp_r(Sources, Dest) ->
|
||||||
SourceStr = string:join(Sources, " "),
|
SourceStr = string:join(Sources, " "),
|
||||||
[] = os:cmd(?FMT("cp -R ~s ~s", [SourceStr, Dest])),
|
[] = os:cmd(?FMT("cp -R ~s ~s", [SourceStr, Dest])),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
ln_sf(Source, Dest) ->
|
|
||||||
case filelib:is_dir(Dest) of
|
|
||||||
true ->
|
|
||||||
ActualDest = filename:join([Dest, filename:basename(Source)]);
|
|
||||||
false ->
|
|
||||||
ActualDest = Dest
|
|
||||||
end,
|
|
||||||
[] = os:cmd(?FMT("ln -sf ~s ~s", [Source, ActualDest])),
|
|
||||||
ok.
|
|
||||||
|
|
||||||
delete_each([]) ->
|
delete_each([]) ->
|
||||||
ok;
|
ok;
|
||||||
delete_each([File | Rest]) ->
|
delete_each([File | Rest]) ->
|
||||||
|
|
Loading…
Reference in a new issue