瀏覽代碼

asn1_compiler: only move hrl file if it exists

pull/3/head
Ali Yakout 13 年之前
committed by Tuncer Ayaz
父節點
當前提交
e0d9ca0773
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. +6
    -2
      src/rebar_asn1_compiler.erl

+ 6
- 2
src/rebar_asn1_compiler.erl 查看文件

@ -58,8 +58,12 @@ compile_asn1(Source, Target, Config) ->
ok ->
Asn1 = filename:basename(Source, ".asn1"),
HrlFile = filename:join("src", Asn1 ++ ".hrl"),
ok = rebar_file_utils:mv(HrlFile, "include"),
ok;
case filelib:is_regular(HrlFile) of
true ->
ok = rebar_file_utils:mv(HrlFile, "include");
false ->
ok
end;
{error, _Reason} ->
?FAIL
end.

Loading…
取消
儲存