diff options
author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-03-02 19:04:03 -0600 |
---|---|---|
committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-03-02 19:04:03 -0600 |
commit | baf46a861b18086131707d056ee106c9fba8da3d (patch) | |
tree | c0bc1de343e52f8385d9f1740e32df5e85dfa234 /src/rebar_app_utils.erl | |
parent | 8affde1c37ba746df41343a52fd8e239ebfe2db3 (diff) | |
parent | af0f4bb20a66f1464fa25d31f9b69784f3119493 (diff) |
Merge pull request #187 from tsloughter/profiles_dir
make base_dir for a run include the profiles in path, link to shared dep
Diffstat (limited to 'src/rebar_app_utils.erl')
-rw-r--r-- | src/rebar_app_utils.erl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl index cd1124a..143d73d 100644 --- a/src/rebar_app_utils.erl +++ b/src/rebar_app_utils.erl @@ -29,9 +29,10 @@ -export([find/2, find/3, is_app_src/1, - app_src_to_app/1, + app_src_to_app/2, validate_application_info/1, - validate_application_info/2]). + validate_application_info/2, + format_error/1]). -include("rebar.hrl"). -include_lib("providers/include/providers.hrl"). @@ -56,9 +57,8 @@ is_app_src(Filename) -> %% this is an .app.src file. Filename =/= filename:rootname(Filename, ".app.src"). -app_src_to_app(Filename) -> - Path = filename:join(rebar_utils:droplast(filename:split(filename:dirname(Filename)))), - AppFile = filename:join([Path, "ebin", filename:basename(Filename, ".app.src") ++ ".app"]), +app_src_to_app(OutDir, Filename) -> + AppFile = filename:join([OutDir, "ebin", filename:basename(Filename, ".app.src") ++ ".app"]), filelib:ensure_dir(AppFile), AppFile. @@ -81,6 +81,9 @@ validate_application_info(AppInfo, AppDetail) -> end end. +format_error(Error) -> + io_lib:format("~p", [Error]). + %% =================================================================== %% Internal functions %% =================================================================== |