Permalink
Browse files

asn1_compiler: only move hrl file if it exists

  • Loading branch information...
ayakout authored and tuncer committed Mar 30, 2012
1 parent 3f14c1c commit e0d9ca077369c78275fea09d5448451bfa7362cf
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/rebar_asn1_compiler.erl
@@ -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.

0 comments on commit e0d9ca0

Please sign in to comment.