Browse Source

Fix issues with bash quoting and directories with spaces.

mark_story 14 years ago
parent
commit
bda8df1b50
2 changed files with 9 additions and 9 deletions
  1. 4 4
      app/Console/cake
  2. 5 5
      lib/Cake/Console/cake

+ 4 - 4
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;

+ 5 - 5
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;
+exit;