diff options
Diffstat (limited to 'src/rebar_otp_app.erl')
-rw-r--r-- | src/rebar_otp_app.erl | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/rebar_otp_app.erl b/src/rebar_otp_app.erl index 9f61e71..507da70 100644 --- a/src/rebar_otp_app.erl +++ b/src/rebar_otp_app.erl @@ -40,11 +40,17 @@ compile(State, App) -> %% If we get an .app.src file, it needs to be pre-processed and %% written out as a ebin/*.app file. That resulting file will then %% be validated as usual. - App1 = case rebar_app_info:app_file_src(App) of + App1 = case rebar_app_info:app_file_src_script(App) of undefined -> - App; - AppFileSrc -> - File = preprocess(State, App, AppFileSrc), + case rebar_app_info:app_file_src(App) of + undefined -> + App; + AppFileSrc -> + File = preprocess(State, App, AppFileSrc), + rebar_app_info:app_file(App, File) + end; + AppFileSrcScript -> + File = preprocess(State, App, AppFileSrcScript), rebar_app_info:app_file(App, File) end, @@ -199,7 +205,8 @@ consult_app_file(Filename) -> false -> {error, enoent}; true -> - case lists:suffix(".app.src", Filename) of + case lists:suffix(".app.src", Filename) + orelse lists:suffix(".app.src.script", Filename) of false -> file:consult(Filename); true -> |