mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
Add possibility to make symbolic links
Simple feature, useful to make link to something without copying it.
This commit is contained in:
parent
176ec0e71e
commit
eb23571b8b
1 changed files with 10 additions and 0 deletions
|
@ -380,6 +380,16 @@ execute_template([{chmod, Mod, File} | Rest], TemplateType, TemplateName,
|
|||
?ABORT("Failed while processing template instruction "
|
||||
"{cmod, ~b, ~s}: ~p~n", [Mod, File, Reason])
|
||||
end;
|
||||
execute_template([{symlink, Target, LinkName} | Rest], TemplateType, TemplateName,
|
||||
Context, Force, ExistingFiles) ->
|
||||
case file:make_symlink(Target, LinkName) of
|
||||
ok ->
|
||||
execute_template(Rest, TemplateType, TemplateName,
|
||||
Context, Force, ExistingFiles);
|
||||
{error, Reason} ->
|
||||
?ABORT("Failed while processing template instruction "
|
||||
"{symlink, ~s, ~s}: ~p~n", [Target, LinkName, Reason])
|
||||
end;
|
||||
execute_template([{variables, _} | Rest], TemplateType, TemplateName, Context,
|
||||
Force, ExistingFiles) ->
|
||||
execute_template(Rest, TemplateType, TemplateName,
|
||||
|
|
Loading…
Reference in a new issue