diff options
-rw-r--r-- | src/rebar_templater.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rebar_templater.erl b/src/rebar_templater.erl index 5fe427b..d5709c3 100644 --- a/src/rebar_templater.erl +++ b/src/rebar_templater.erl @@ -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, |