mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Adding symlink support to the cake console executable
This commit is contained in:
parent
6d9b709c7a
commit
36fa2e87b4
3 changed files with 28 additions and 4 deletions
|
@ -17,7 +17,15 @@
|
|||
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
#
|
||||
################################################################################
|
||||
LIB=${0/%cake/}
|
||||
LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0")
|
||||
|
||||
while [ -h $LIB ]; do
|
||||
DIR=$(dirname -- "$LIB")
|
||||
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}" "$@"
|
||||
|
|
|
@ -17,9 +17,17 @@
|
|||
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
#
|
||||
################################################################################
|
||||
LIB=${0/%cake/}
|
||||
LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0")
|
||||
|
||||
while [ -h $LIB ]; do
|
||||
DIR=$(dirname -- "$LIB")
|
||||
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}" "$@"
|
||||
|
||||
exit;
|
||||
exit;
|
|
@ -17,7 +17,15 @@
|
|||
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
#
|
||||
################################################################################
|
||||
LIB=${0/%cake/}
|
||||
LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0")
|
||||
|
||||
while [ -h $LIB ]; do
|
||||
DIR=$(dirname -- "$LIB")
|
||||
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}" "$@"
|
||||
|
|
Loading…
Add table
Reference in a new issue