aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/unix
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-05-30 18:45:34 +0200
committerLukas Larsson <[email protected]>2012-06-05 10:52:16 +0200
commit5f8867fb985b2b899e2ba8391652c7111f9df9bb (patch)
tree768a901c7372789ac8f39f0d100e4c03c81b4dc8 /erts/etc/unix
parent3e348c69b6921dd0e2c5b699ccd36d46321c953c (diff)
downloadotp-5f8867fb985b2b899e2ba8391652c7111f9df9bb.tar.gz
otp-5f8867fb985b2b899e2ba8391652c7111f9df9bb.tar.bz2
otp-5f8867fb985b2b899e2ba8391652c7111f9df9bb.zip
Update to work with whitespace in exec path
OTP-10106 OTP-10107
Diffstat (limited to 'erts/etc/unix')
-rw-r--r--erts/etc/unix/Install.src40
-rw-r--r--erts/etc/unix/cerl.src2
-rw-r--r--erts/etc/unix/erl.src.src4
3 files changed, 23 insertions, 23 deletions
diff --git a/erts/etc/unix/Install.src b/erts/etc/unix/Install.src
index 8f40c43874..58f7b38ed0 100644
--- a/erts/etc/unix/Install.src
+++ b/erts/etc/unix/Install.src
@@ -66,12 +66,12 @@ then
exit 1
fi
-if [ ! -d $ERL_ROOT/bin ]
+if [ ! -d "$ERL_ROOT/bin" ]
then
- mkdir $ERL_ROOT/bin
+ mkdir "$ERL_ROOT/bin"
fi
-cd $ERL_ROOT/erts-%I_VSN%/bin
+cd "$ERL_ROOT/erts-%I_VSN%/bin"
sed -e "s;%FINAL_ROOTDIR%;$TARGET_ERL_ROOT;" erl.src > erl
chmod 755 erl
@@ -79,18 +79,18 @@ chmod 755 erl
#
# Create start file for embedded system use,
#
-(cd $ERL_ROOT/erts-%I_VSN%/bin;
+(cd "$ERL_ROOT/erts-%I_VSN%/bin";
sed -e "s;%FINAL_ROOTDIR%;$TARGET_ERL_ROOT;" start.src > start;
chmod 755 start)
-cd $ERL_ROOT/bin
+cd "$ERL_ROOT/bin"
-cp -p $ERL_ROOT/erts-%I_VSN%/bin/erl .
-cp -p $ERL_ROOT/erts-%I_VSN%/bin/erlc .
-cp -p $ERL_ROOT/erts-%I_VSN%/bin/dialyzer .
-cp -p $ERL_ROOT/erts-%I_VSN%/bin/typer .
-cp -p $ERL_ROOT/erts-%I_VSN%/bin/ct_run .
-cp -p $ERL_ROOT/erts-%I_VSN%/bin/escript .
+cp -p "$ERL_ROOT/erts-%I_VSN%/bin/erl" .
+cp -p "$ERL_ROOT/erts-%I_VSN%/bin/erlc" .
+cp -p "$ERL_ROOT/erts-%I_VSN%/bin/dialyzer" .
+cp -p "$ERL_ROOT/erts-%I_VSN%/bin/typer" .
+cp -p "$ERL_ROOT/erts-%I_VSN%/bin/ct_run" .
+cp -p "$ERL_ROOT/erts-%I_VSN%/bin/escript" .
# Remove in R16B
ln -s ct_run run_test
@@ -107,15 +107,15 @@ fi
ln -s ../erts-%I_VSN%/bin/epmd epmd
-cp -p $ERL_ROOT/erts-%I_VSN%/bin/run_erl .
-cp -p $ERL_ROOT/erts-%I_VSN%/bin/to_erl .
-cp -p $ERL_ROOT/erts-%I_VSN%/bin/start .
-sed -e "s;%EMU%;%EMULATOR%%EMULATOR_NUMBER%;" $ERL_ROOT/erts-%I_VSN%/bin/start_erl.src > start_erl
+cp -p "$ERL_ROOT/erts-%I_VSN%/bin/run_erl" .
+cp -p "$ERL_ROOT/erts-%I_VSN%/bin/to_erl" .
+cp -p "$ERL_ROOT/erts-%I_VSN%/bin/start" .
+sed -e "s;%EMU%;%EMULATOR%%EMULATOR_NUMBER%;" "$ERL_ROOT/erts-%I_VSN%/bin/start_erl.src" > start_erl
chmod 755 start_erl
echo ""
-echo %I_VSN% %I_SYSTEM_VSN% > $ERL_ROOT/releases/start_erl.data
-sed -e "s;%ERL_ROOT%;$TARGET_ERL_ROOT;" $ERL_ROOT/releases/RELEASES.src > $ERL_ROOT/releases/RELEASES
+echo %I_VSN% %I_SYSTEM_VSN% > "$ERL_ROOT/releases/start_erl.data"
+sed -e "s;%ERL_ROOT%;$TARGET_ERL_ROOT;" "$ERL_ROOT/releases/RELEASES.src" > "$ERL_ROOT/releases/RELEASES"
if [ "$start_option" = "query" ]
then
@@ -147,10 +147,10 @@ cp -p ../releases/%I_SYSTEM_VSN%/$Name.script start.script
# Fixing the man pages
#
-if [ -d $ERL_ROOT/man ]
+if [ -d "$ERL_ROOT/man" ]
then
- cd $ERL_ROOT
- ./misc/format_man_pages $ERL_ROOT
+ cd "$ERL_ROOT"
+ ./misc/format_man_pages "$ERL_ROOT"
fi
exit 0
diff --git a/erts/etc/unix/cerl.src b/erts/etc/unix/cerl.src
index 0b2d6512ea..6a431ce4da 100644
--- a/erts/etc/unix/cerl.src
+++ b/erts/etc/unix/cerl.src
@@ -227,7 +227,7 @@ done
PATH=$BINDIR:$ROOTDIR/bin:$PATH
EXEC=$BINDIR/erlexec
-PROGNAME="$PROGNAME $cargs"
+PROGNAME="$PROGNAME$cargs"
EMU="$EMU$TYPE"
EMU_NAME=`$EXEC -emu_name_exit $eeargs`
diff --git a/erts/etc/unix/erl.src.src b/erts/etc/unix/erl.src.src
index 50603f12f4..fa187c5509 100644
--- a/erts/etc/unix/erl.src.src
+++ b/erts/etc/unix/erl.src.src
@@ -17,7 +17,7 @@
#
# %CopyrightEnd%
#
-ROOTDIR=%FINAL_ROOTDIR%
+ROOTDIR="%FINAL_ROOTDIR%"
BINDIR=$ROOTDIR/erts-%VSN%/bin
EMU=%EMULATOR%%EMULATOR_NUMBER%
PROGNAME=`echo $0 | sed 's/.*\///'`
@@ -25,4 +25,4 @@ export EMU
export ROOTDIR
export BINDIR
export PROGNAME
-exec $BINDIR/erlexec ${1+"$@"}
+exec "$BINDIR/erlexec" ${1+"$@"}