aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2015-06-01 13:40:14 -0500
committerTristan Sloughter <[email protected]>2015-06-01 13:40:54 -0500
commitba268a442a6f6cd975db8ab05bcc7760f8a261e7 (patch)
tree999bd571ed469353717c06d34fa5678ce63c2557 /src
parent8ca998842ee80d71be989fcc6ee2ee44a5617a1e (diff)
downloadrelx-ba268a442a6f6cd975db8ab05bcc7760f8a261e7.tar.gz
relx-ba268a442a6f6cd975db8ab05bcc7760f8a261e7.tar.bz2
relx-ba268a442a6f6cd975db8ab05bcc7760f8a261e7.zip
always include start_clean
Diffstat (limited to 'src')
-rw-r--r--src/rlx_prv_assembler.erl23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/rlx_prv_assembler.erl b/src/rlx_prv_assembler.erl
index 3b2638b..79768d3 100644
--- a/src/rlx_prv_assembler.erl
+++ b/src/rlx_prv_assembler.erl
@@ -320,6 +320,14 @@ write_bin_file(State, Release, OutputDir, RelDir) ->
BareRel = filename:join(BinDir, RelName),
ErlOpts = rlx_state:get(State, erl_opts, ""),
{OsFamily, _OsName} = os:type(),
+
+ Prefix = code:root_dir(),
+ DstFile = filename:join([BinDir, "start_clean.boot"]),
+ %% Explicitly remove before cp, since it is 0444 mode
+ ec_file:remove(DstFile),
+ ok = ec_file:copy(filename:join([Prefix, "bin", "start_clean.boot"]),
+ DstFile),
+
StartFile = case rlx_state:get(State, extended_start_script, false) of
false ->
case rlx_state:get(State, include_nodetool, false) of
@@ -366,12 +374,6 @@ write_bin_file(State, Release, OutputDir, RelDir) ->
include_erts(State, Release, OutputDir, RelDir).
include_nodetool(BinDir) ->
- Prefix = code:root_dir(),
- DstFile = filename:join([BinDir, "start_clean.boot"]),
- %% Explicitly remove before cp, since it is 0444 mode
- ec_file:remove(DstFile),
- ok = ec_file:copy(filename:join([Prefix, "bin", "start_clean.boot"]),
- DstFile),
NodeToolFile = nodetool_contents(),
InstallUpgradeFile = install_upgrade_escript_contents(),
NodeTool = filename:join([BinDir, "nodetool"]),
@@ -476,11 +478,14 @@ include_erts(State, Release, OutputDir, RelDir) ->
ok = ec_file:remove(ErlIni),
ok = file:write_file(ErlIni, erl_ini(OutputDir, ErtsVersion))
end,
+
+ ok = ec_file:remove(filename:join([OutputDir, "bin", "start_clean.boot"])),
+ ok = ec_file:copy(filename:join([Prefix, "bin", "start_clean.boot"]),
+ filename:join([OutputDir, "bin", "start_clean.boot"])),
+
case rlx_state:get(State, extended_start_script, false) of
true ->
- ok = ec_file:remove(filename:join([OutputDir, "bin", "start_clean.boot"])),
- ok = ec_file:copy(filename:join([Prefix, "bin", "start_clean.boot"]),
- filename:join([OutputDir, "bin", "start_clean.boot"])),
+
NodeToolFile = nodetool_contents(),
InstallUpgradeFile = install_upgrade_escript_contents(),
NodeTool = filename:join([LocalErts, "bin", "nodetool"]),