diff options
author | Björn Gustavsson <bjorn@erlang.org> | 2022-03-16 07:38:59 +0100 |
---|---|---|
committer | Björn Gustavsson <bjorn@erlang.org> | 2022-03-16 14:58:46 +0100 |
commit | 55a827ea5bdaccac95f0aa3173da4934c745d304 (patch) | |
tree | e77ae0a1ec83e52ca52f7b249d3eafce136c70f4 | |
parent | 82e74303e715c7c64c1998bf034b12a48ce814b1 (diff) | |
download | erlang-55a827ea5bdaccac95f0aa3173da4934c745d304.tar.gz |
erl script: Support installation paths with spaces
Quote everything in the `erl` script so that it will be possible to
start Erlang if the installation has been moved to a path with
spaces in its name.
-rw-r--r-- | erts/etc/unix/erl.src.src | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/erts/etc/unix/erl.src.src b/erts/etc/unix/erl.src.src index 2972f1e0c1..536fa139d9 100644 --- a/erts/etc/unix/erl.src.src +++ b/erts/etc/unix/erl.src.src @@ -19,7 +19,7 @@ # %CopyrightEnd% # prog="$0" -progdir="`dirname ${prog}`" +progdir=`dirname "${prog}"` dyn_erl_path="${progdir}/%DYN_ERL_PATH%" if [ ! -f "$dyn_erl_path" ] then @@ -28,9 +28,9 @@ fi if [ -f "$dyn_erl_path" ] then - dyn_rootdir=`${dyn_erl_path} --realpath` - dyn_rootdir=`dirname ${dyn_rootdir}` - dyn_rootdir=`dirname ${dyn_rootdir}` + dyn_rootdir=`"${dyn_erl_path}" --realpath` + dyn_rootdir=`dirname "${dyn_rootdir}"` + dyn_rootdir=`dirname "${dyn_rootdir}"` dyn_rootdir="${dyn_rootdir}%DYN_ROOTDIR_BASE_EXT%" else dyn_rootdir="" @@ -47,9 +47,9 @@ then else ROOTDIR="$ERL_ROOTDIR" fi -BINDIR=$ROOTDIR/erts-%VSN%/bin +BINDIR="$ROOTDIR/erts-%VSN%/bin" EMU=%EMULATOR%%EMULATOR_NUMBER% -PROGNAME=`echo $0 | sed 's/.*\///'` +PROGNAME=`basename "$0"` export EMU export ROOTDIR export BINDIR |