From e2c49fd6cad30d2a88bee7892588437f3d44f1f8 Mon Sep 17 00:00:00 2001 From: flowtron Date: Sun, 27 Mar 2011 15:36:44 +0000 Subject: [PATCH] making paths with spaces work git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6144 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- assaultcube.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assaultcube.sh b/assaultcube.sh index 755281f9..c52325c8 100755 --- a/assaultcube.sh +++ b/assaultcube.sh @@ -3,7 +3,7 @@ #CUBE_DIR=~/cube #CUBE_DIR=/usr/local/cube #CUBE_DIR=./ -CUBE_DIR=$(dirname $(readlink -f "${0}")) +CUBE_DIR=$(dirname "$(readlink -f "${0}")") # CUBE_OPTIONS contains any command line options you would like to start Cube with. #CUBE_OPTIONS="-f" @@ -43,16 +43,16 @@ x86_64) ;; esac -if [ -x ${CUBE_DIR}/bin_unix/native_client ] +if [ -x "${CUBE_DIR}/bin_unix/native_client" ] then SYSTEM_NAME=native_ MACHINE_NAME= fi -if [ -x ${CUBE_DIR}/bin_unix/${SYSTEM_NAME}${MACHINE_NAME}client ] +if [ -x "${CUBE_DIR}/bin_unix/${SYSTEM_NAME}${MACHINE_NAME}client" ] then - cd ${CUBE_DIR} - exec ${CUBE_DIR}/bin_unix/${SYSTEM_NAME}${MACHINE_NAME}client ${CUBE_OPTIONS} "$@" + cd "${CUBE_DIR}" + exec "${CUBE_DIR}/bin_unix/${SYSTEM_NAME}${MACHINE_NAME}client" ${CUBE_OPTIONS} "$@" else echo "Your platform does not have a pre-compiled Cube client." echo "Please follow the following steps to build a native client:"