diff options
-rw-r--r-- | src/rebar_escripter.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rebar_escripter.erl b/src/rebar_escripter.erl index 8b23263..f7f45ba 100644 --- a/src/rebar_escripter.erl +++ b/src/rebar_escripter.erl @@ -58,7 +58,11 @@ escriptize(Config, AppFile) -> {ok, {"mem", ZipBin}} -> %% Archive was successfully created. Prefix that binary with our %% header and write to our escript file - Script = <<"#!/usr/bin/env escript\n", ZipBin/binary>>, + Shebang = rebar_config:get(Config, escript_shebang, + "#!/usr/bin/env escript\n"), + Comment = rebar_config:get(Config, escript_comment, "%%\n"), + EmuArgs = rebar_config:get(Config, escript_emu_args, "%%!\n"), + Script = iolist_to_binary([Shebang, Comment, EmuArgs, ZipBin]), case file:write_file(Filename, Script) of ok -> ok; |