mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding symlink resolution to app/Console/cake
Otherwise, if you symlink to app/Console/cake the app path gets set to 2 folders above wherever the symlink is defined.
This commit is contained in:
parent
2f7f5e1322
commit
70ac1c7e33
1 changed files with 4 additions and 2 deletions
|
@ -17,7 +17,8 @@
|
|||
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
#
|
||||
################################################################################
|
||||
LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0")
|
||||
ME=$(readlink -f $0)
|
||||
LIB=$(cd -P -- "$(dirname -- "$ME")" && pwd -P) && LIB=$LIB/$(basename -- "$ME")
|
||||
|
||||
while [ -h "$LIB" ]; do
|
||||
DIR=$(dirname -- "$LIB")
|
||||
|
@ -26,8 +27,9 @@ while [ -h "$LIB" ]; do
|
|||
done
|
||||
|
||||
LIB=$(dirname -- "$LIB")/
|
||||
APP=$(dirname $(cd $(dirname $0) && pwd))
|
||||
APP=$(dirname $(cd $(dirname $ME) && pwd))
|
||||
|
||||
echo $APP
|
||||
exec php -q "$LIB"cake.php -working "$APP" "$@"
|
||||
|
||||
exit;
|
||||
|
|
Loading…
Reference in a new issue