diff options
author | konyaris <[email protected]> | 2018-03-22 12:47:33 +0100 |
---|---|---|
committer | konyaris <[email protected]> | 2018-03-22 12:47:33 +0100 |
commit | 8f565ebe647370d413da07dc366ee10565358959 (patch) | |
tree | ceebe6827e674e6a4234f2c63b1a5f1210bb6d8f /priv/templates | |
parent | 86d415f33c500d432d6c9fa2fcbff3bb2fff3e8f (diff) | |
download | relx-8f565ebe647370d413da07dc366ee10565358959.tar.gz relx-8f565ebe647370d413da07dc366ee10565358959.tar.bz2 relx-8f565ebe647370d413da07dc366ee10565358959.zip |
Extend adding extra args from vm.args to install_upgrade.escript
Diffstat (limited to 'priv/templates')
-rwxr-xr-x | priv/templates/extended_bin | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin index 1e8aa63..daa071b 100755 --- a/priv/templates/extended_bin +++ b/priv/templates/extended_bin @@ -233,7 +233,9 @@ replace_os_vars() { escript_emulator_args() { if [ -n "${VM_ARGS}" ]; then if grep -q '%%!' $1; then - cmd=$(echo sed -i"' '" "'s|%%!.*|%%! ${VM_ARGS}|'" $1) + cmd=$(echo sed -i"' '" "'/%%!.*/ s| ${VM_ARGS}||'" $1) + eval "$cmd" + cmd=$(echo sed -i"' '" "'/%%!.*/ s|$| ${VM_ARGS}|'" $1) eval "$cmd" else cmd=$(echo sed -i"' '" "'/#!.*/ a \\ @@ -579,6 +581,8 @@ case "$1" in relx_run_hooks "$PRE_INSTALL_UPGRADE_HOOKS" + escript_emulator_args $ROOTDIR/bin/install_upgrade.escript + exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \ "$COMMAND" "{'$REL_NAME', \"$NAME_TYPE\", '$NAME', '$COOKIE'}" "$@" @@ -593,6 +597,8 @@ case "$1" in fi COMMAND="$1"; shift + + escript_emulator_args $ROOTDIR/bin/install_upgrade.escript exec "$BINDIR/escript" "$ROOTDIR/bin/install_upgrade.escript" \ "versions" "{'$REL_NAME', \"$NAME_TYPE\", '$NAME', '$COOKIE'}" "$@" |