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 by following every symlink of the given name recursively
|
||||||
canonicalize() {
|
canonicalize() {
|
||||||
NAME=$1
|
NAME="$1"
|
||||||
if [ -f "$NAME" ]
|
if [ -f "$NAME" ]
|
||||||
then
|
then
|
||||||
NAME=$(cd -P -- "$(dirname -- "$NAME")" && pwd -P)/$(basename -- "$NAME")
|
DIR=$(dirname -- "$NAME")
|
||||||
|
NAME=$(cd -P "$DIR" && pwd -P)/$(basename -- "$NAME")
|
||||||
fi
|
fi
|
||||||
while [ -h "$NAME" ]; do
|
while [ -h "$NAME" ]; do
|
||||||
DIR=$(dirname -- "$NAME")
|
DIR=$(dirname -- "$NAME")
|
||||||
|
@ -33,9 +34,8 @@ canonicalize() {
|
||||||
echo "$NAME"
|
echo "$NAME"
|
||||||
}
|
}
|
||||||
|
|
||||||
CONSOLE=$(dirname $(canonicalize "$0"))
|
CONSOLE=$(dirname -- "$(canonicalize "$0")")
|
||||||
APP=`pwd`
|
APP=`pwd`
|
||||||
|
|
||||||
exec php -q $CONSOLE/cake.php -working "$APP" "$@"
|
exec php -q "$CONSOLE"/cake.php -working "$APP" "$@"
|
||||||
|
exit
|
||||||
exit;
|
|
||||||
|
|
Loading…
Reference in a new issue