소스 검색

Add possibility to make symbolic links

Simple feature, useful to make link to something without copying it.
pull/3/head
Przemysław Dąbek 13 년 전
committed by Tuncer Ayaz
부모
커밋
eb23571b8b
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. +10
    -0
      src/rebar_templater.erl

+ 10
- 0
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,

불러오는 중...
취소
저장