# 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}"
# 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"
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 ""