Copying changes doe to cake executable to skel files

This commit is contained in:
Jose Lorenzo Rodriguez 2012-12-23 00:23:01 +01:00
parent 693be600f8
commit bcda684ad7
2 changed files with 24 additions and 16 deletions

View file

@ -12,15 +12,20 @@
# #
# @copyright Copyright 2005-2012, Cake Software Foundation, Inc. # @copyright Copyright 2005-2012, Cake Software Foundation, Inc.
# @link http://cakephp.org CakePHP(tm) Project # @link http://cakephp.org CakePHP(tm) Project
# @package app.Console # @package cake.Console
# @since CakePHP(tm) v 2.0 # @since CakePHP(tm) v 1.2.0.5012
# @license MIT License (http://www.opensource.org/licenses/mit-license.php) # @license MIT License (http://www.opensource.org/licenses/mit-license.php)
# #
################################################################################ ################################################################################
# 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" ]
then
DIR=$(dirname -- "$NAME")
NAME=$(cd -P "$DIR" && pwd -P)/$(basename -- "$NAME")
fi
while [ -h "$NAME" ]; do while [ -h "$NAME" ]; do
DIR=$(dirname -- "$NAME") DIR=$(dirname -- "$NAME")
SYM=$(readlink "$NAME") SYM=$(readlink "$NAME")
@ -29,9 +34,8 @@ canonicalize() {
echo "$NAME" echo "$NAME"
} }
CONSOLE=$(dirname $(canonicalize "$0")) CONSOLE=$(dirname -- "$(canonicalize "$0")")
APP=$(dirname "$CONSOLE") APP=`pwd`
exec php -q $CONSOLE/cake.php -working "$APP" "$@" exec php -q "$CONSOLE"/cake.php -working "$APP" "$@"
exit
exit;

View file

@ -12,15 +12,20 @@
# #
# @copyright Copyright 2005-2012, Cake Software Foundation, Inc. # @copyright Copyright 2005-2012, Cake Software Foundation, Inc.
# @link http://cakephp.org CakePHP(tm) Project # @link http://cakephp.org CakePHP(tm) Project
# @package app.Console # @package cake.Console
# @since CakePHP(tm) v 2.0 # @since CakePHP(tm) v 1.2.0.5012
# @license MIT License (http://www.opensource.org/licenses/mit-license.php) # @license MIT License (http://www.opensource.org/licenses/mit-license.php)
# #
################################################################################ ################################################################################
# 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" ]
then
DIR=$(dirname -- "$NAME")
NAME=$(cd -P "$DIR" && pwd -P)/$(basename -- "$NAME")
fi
while [ -h "$NAME" ]; do while [ -h "$NAME" ]; do
DIR=$(dirname -- "$NAME") DIR=$(dirname -- "$NAME")
SYM=$(readlink "$NAME") SYM=$(readlink "$NAME")
@ -29,9 +34,8 @@ canonicalize() {
echo "$NAME" echo "$NAME"
} }
CONSOLE=$(dirname $(canonicalize "$0")) CONSOLE=$(dirname -- "$(canonicalize "$0")")
APP=$(dirname "$CONSOLE") APP=`pwd`
exec php -q $CONSOLE/cake.php -working "$APP" "$@" exec php -q "$CONSOLE"/cake.php -working "$APP" "$@"
exit
exit;