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 ->
|
ok ->
|
||||||
Asn1 = filename:basename(Source, ".asn1"),
|
Asn1 = filename:basename(Source, ".asn1"),
|
||||||
HrlFile = filename:join("src", Asn1 ++ ".hrl"),
|
HrlFile = filename:join("src", Asn1 ++ ".hrl"),
|
||||||
ok = rebar_file_utils:mv(HrlFile, "include"),
|
case filelib:is_regular(HrlFile) of
|
||||||
ok;
|
true ->
|
||||||
|
ok = rebar_file_utils:mv(HrlFile, "include");
|
||||||
|
false ->
|
||||||
|
ok
|
||||||
|
end;
|
||||||
{error, _Reason} ->
|
{error, _Reason} ->
|
||||||
?FAIL
|
?FAIL
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Reference in a new issue