mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
asn1_compiler: only move hrl file if it exists
This commit is contained in:
parent
3f14c1c092
commit
e0d9ca0773
1 changed files with 6 additions and 2 deletions
|
@ -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…
Reference in a new issue