diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2012-04-22 21:53:32 +0200 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2012-07-13 15:21:56 +0200 |
commit | e185e86bff17fa7d093f8b24fcc45069ffde55ae (patch) | |
tree | 08cbdc29922bc67d691f21be9d76d7a5c8d4c668 /src/rebar_escripter.erl | |
parent | 1948eb4a47c1aa61aebbd046aa951f103a1f8644 (diff) | |
download | rebar-e185e86bff17fa7d093f8b24fcc45069ffde55ae.tar.gz |
Remove shared state
Diffstat (limited to 'src/rebar_escripter.erl')
-rw-r--r-- | src/rebar_escripter.erl | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rebar_escripter.erl b/src/rebar_escripter.erl index b51a2a5..9ff59f1 100644 --- a/src/rebar_escripter.erl +++ b/src/rebar_escripter.erl @@ -36,10 +36,10 @@ %% Public API %% =================================================================== -escriptize(Config, AppFile) -> +escriptize(Config0, AppFile) -> %% Extract the application name from the archive -- this is the default %% name of the generated script - AppName = rebar_app_utils:app_name(AppFile), + {Config, AppName} = rebar_app_utils:app_name(Config0, AppFile), %% Get the output filename for the escript -- this may include dirs Filename = rebar_config:get_local(Config, escript_name, AppName), @@ -85,16 +85,17 @@ escriptize(Config, AppFile) -> %% Finally, update executable perms for our script {ok, #file_info{mode = Mode}} = file:read_file_info(Filename), ok = file:change_mode(Filename, Mode bor 8#00111), - ok. + {ok, Config}. -clean(Config, AppFile) -> +clean(Config0, AppFile) -> %% Extract the application name from the archive -- this is the default %% name of the generated script - AppName = rebar_app_utils:app_name(AppFile), + {Config, AppName} = rebar_app_utils:app_name(Config0, AppFile), %% Get the output filename for the escript -- this may include dirs Filename = rebar_config:get_local(Config, escript_name, AppName), - rebar_file_utils:delete_each([Filename]). + rebar_file_utils:delete_each([Filename]), + {ok, Config}. %% =================================================================== %% Internal functions |