From bda8df1b50c9f61f28a023bb927cac87c23fa3fe Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 15 Oct 2011 09:56:04 -0400 Subject: [PATCH] Fix issues with bash quoting and directories with spaces. --- app/Console/cake | 8 ++++---- lib/Cake/Console/cake | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Console/cake b/app/Console/cake index 010b675cf..9ef7530a9 100755 --- a/app/Console/cake +++ b/app/Console/cake @@ -19,15 +19,15 @@ ################################################################################ LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0") -while [ -h $LIB ]; do +while [ -h "$LIB" ]; do DIR=$(dirname -- "$LIB") - SYM=$(readlink $LIB) - LIB=$(cd $DIR && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM") + SYM=$(readlink "$LIB") + LIB=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM") done LIB=$(dirname -- "$LIB")/ APP=`pwd` -exec php -q ${LIB}cake.php -working "${APP}" "$@" +exec php -q "$LIB"cake.php -working "$APP" "$@" exit; diff --git a/lib/Cake/Console/cake b/lib/Cake/Console/cake index 05b813e99..2bd7aa7ea 100755 --- a/lib/Cake/Console/cake +++ b/lib/Cake/Console/cake @@ -19,15 +19,15 @@ ################################################################################ LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0") -while [ -h $LIB ]; do +while [ -h "$LIB" ]; do DIR=$(dirname -- "$LIB") - SYM=$(readlink $LIB) - LIB=$(cd $DIR && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM") + SYM=$(readlink "$LIB") + LIB=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM") done LIB=$(dirname -- "$LIB")/ APP=`pwd` -exec php -q ${LIB}cake.php -working "${APP}" "$@" +exec php -q "$LIB"cake.php -working "$APP" "$@" -exit; \ No newline at end of file +exit;