mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix issues with paths + spaces.
This commit is contained in:
parent
d16a9ab98e
commit
b346227d10
1 changed files with 6 additions and 6 deletions
|
@ -20,10 +20,11 @@
|
|||
|
||||
# Canonicalize by following every symlink of the given name recursively
|
||||
canonicalize() {
|
||||
NAME=$1
|
||||
NAME="$1"
|
||||
if [ -f "$NAME" ]
|
||||
then
|
||||
NAME=$(cd -P -- "$(dirname -- "$NAME")" && pwd -P)/$(basename -- "$NAME")
|
||||
DIR=$(dirname -- "$NAME")
|
||||
NAME=$(cd -P "$DIR" && pwd -P)/$(basename -- "$NAME")
|
||||
fi
|
||||
while [ -h "$NAME" ]; do
|
||||
DIR=$(dirname -- "$NAME")
|
||||
|
@ -33,9 +34,8 @@ canonicalize() {
|
|||
echo "$NAME"
|
||||
}
|
||||
|
||||
CONSOLE=$(dirname $(canonicalize "$0"))
|
||||
CONSOLE=$(dirname -- "$(canonicalize "$0")")
|
||||
APP=`pwd`
|
||||
|
||||
exec php -q $CONSOLE/cake.php -working "$APP" "$@"
|
||||
|
||||
exit;
|
||||
exec php -q "$CONSOLE"/cake.php -working "$APP" "$@"
|
||||
exit
|
||||
|
|
Loading…
Reference in a new issue