diff options
author | Eric <[email protected]> | 2012-12-28 11:47:35 -0500 |
---|---|---|
committer | Eric <[email protected]> | 2012-12-28 11:47:35 -0500 |
commit | ae2e47e811ef113c0e6ab1df2bb66a4917f7ea07 (patch) | |
tree | e2bf405b7fcc8b3d54bcfb27abb0b5809ee0c7eb /src/rcl_prv_assembler.erl | |
parent | b5b6cf855b3bceaac76ccd330d64cfeb2b1f4c14 (diff) | |
download | relx-ae2e47e811ef113c0e6ab1df2bb66a4917f7ea07.tar.gz relx-ae2e47e811ef113c0e6ab1df2bb66a4917f7ea07.tar.bz2 relx-ae2e47e811ef113c0e6ab1df2bb66a4917f7ea07.zip |
support the ability to *not* autogenerate start scripts
Diffstat (limited to 'src/rcl_prv_assembler.erl')
-rw-r--r-- | src/rcl_prv_assembler.erl | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/rcl_prv_assembler.erl b/src/rcl_prv_assembler.erl index a721b12..61f6dad 100644 --- a/src/rcl_prv_assembler.erl +++ b/src/rcl_prv_assembler.erl @@ -210,11 +210,18 @@ write_bin_file(State, Release, OutputDir, RelDir) -> ErlOpts = rcl_state:get(State, erl_opts, ""), StartFile = bin_file_contents(RelName, RelVsn, rcl_release:erts(Release), - ErlOpts), - ok = file:write_file(VsnRel, StartFile), - ok = file:change_mode(VsnRel, 8#777), - ok = file:write_file(BareRel, StartFile), - ok = file:change_mode(BareRel, 8#777), + ErlOpts), + %% We generate the start script by default, unless the user + %% tells us not too + case rcl_state:get(State, generate_start_script, true) of + false -> + ok; + _ -> + ok = file:write_file(VsnRel, StartFile), + ok = file:change_mode(VsnRel, 8#777), + ok = file:write_file(BareRel, StartFile), + ok = file:change_mode(BareRel, 8#777) + end, copy_or_generate_sys_config_file(State, Release, OutputDir, RelDir). %% @doc copy config/sys.config or generate one to releases/VSN/sys.config |