summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Naugle <toddn@glw.com>2011-05-27 19:46:51 +0000
committerTodd Naugle <toddn@glw.com>2011-05-27 19:46:51 +0000
commit0f28a081de95f449c6242b0b8a9e6c3bcf31161f (patch)
tree89b5c2800968d36fee3ae14de2ae80733bf9b54e
parent18c90b3d34593904d5056bdaa9be562d922be52f (diff)
Properly handle spaces in filenames along the path to the installer.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@9614 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rwxr-xr-xtools/linux_packaging/install.sh14
-rwxr-xr-xtools/linux_packaging/stage2.run6
2 files changed, 10 insertions, 10 deletions
diff --git a/tools/linux_packaging/install.sh b/tools/linux_packaging/install.sh
index 33863ee646..a69a478a7f 100755
--- a/tools/linux_packaging/install.sh
+++ b/tools/linux_packaging/install.sh
@@ -7,19 +7,19 @@
# so go ahead and figure out our path and make sure we are in that directory.
SAVED_PWD=$PWD
-PKG_PATH=$(dirname $(readlink -f $0))
-cd ${PKG_PATH}
+PKG_PATH=$(dirname "$(readlink -f "$0")")
+cd "${PKG_PATH}"
if [ -z "$TERM" ] || [ "$TERM" = "dumb" ]; then
if which xterm > /dev/null; then
- exec xterm -e ${PKG_PATH}/.stage2.run
+ exec xterm -e "${PKG_PATH}/.stage2.run"
elif which gnome-terminal > /dev/null; then
- exec gnome-terminal -e ${PKG_PATH}/.stage2.run
+ exec gnome-terminal -e "${PKG_PATH}/.stage2.run"
elif which konsole > /dev/null; then
- exec konsole -e ${PKG_PATH}/.stage2.run
+ exec konsole -e "${PKG_PATH}/.stage2.run"
fi
else
- ${PKG_PATH}/.stage2.run
+ "${PKG_PATH}/.stage2.run"
fi
-cd ${SAVED_PWD}
+cd "${SAVED_PWD}"
diff --git a/tools/linux_packaging/stage2.run b/tools/linux_packaging/stage2.run
index e8fc12905f..f6a78776fe 100755
--- a/tools/linux_packaging/stage2.run
+++ b/tools/linux_packaging/stage2.run
@@ -101,8 +101,8 @@ SystemInstall ()
# If you double click a script, some systems don't get the PWD correct.
# Force it to be correct
-PKG_PATH=$(dirname $(readlink -f $0))
-cd ${PKG_PATH}
+PKG_PATH=$(dirname "$(readlink -f "$0")")
+cd "${PKG_PATH}"
echo ""
echo "Welcome to the ${PGM_NAME} installer"
@@ -196,7 +196,7 @@ else
REQUIRED_BYTES=$(cat .${PGM_NAME}_${ARCH}-*.size)
#Check space in current folder
- FREE_BYTES=$(df -P -B 1 ${PKG_PATH} | grep / | awk '{print $4}')
+ FREE_BYTES=$(df -P -B 1 "${PKG_PATH}" | grep / | awk '{print $4}')
if [ ${FREE_BYTES} -le ${REQUIRED_BYTES} ] ; then
echo ""