Skip to content

Commit

Permalink
Copying changes doe to cake executable to skel files
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Dec 22, 2012
1 parent 693be60 commit bcda684
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
20 changes: 12 additions & 8 deletions app/Console/cake
Expand Up @@ -12,15 +12,20 @@
#
# @copyright Copyright 2005-2012, Cake Software Foundation, Inc.
# @link http://cakephp.org CakePHP(tm) Project
# @package app.Console
# @since CakePHP(tm) v 2.0
# @package cake.Console
# @since CakePHP(tm) v 1.2.0.5012
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
#
################################################################################

# Canonicalize by following every symlink of the given name recursively
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
DIR=$(dirname -- "$NAME")
SYM=$(readlink "$NAME")
Expand All @@ -29,9 +34,8 @@ canonicalize() {
echo "$NAME"
}

CONSOLE=$(dirname $(canonicalize "$0"))
APP=$(dirname "$CONSOLE")

exec php -q $CONSOLE/cake.php -working "$APP" "$@"
CONSOLE=$(dirname -- "$(canonicalize "$0")")
APP=`pwd`

exit;
exec php -q "$CONSOLE"/cake.php -working "$APP" "$@"
exit
20 changes: 12 additions & 8 deletions lib/Cake/Console/Templates/skel/Console/cake
Expand Up @@ -12,15 +12,20 @@
#
# @copyright Copyright 2005-2012, Cake Software Foundation, Inc.
# @link http://cakephp.org CakePHP(tm) Project
# @package app.Console
# @since CakePHP(tm) v 2.0
# @package cake.Console
# @since CakePHP(tm) v 1.2.0.5012
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
#
################################################################################

# Canonicalize by following every symlink of the given name recursively
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
DIR=$(dirname -- "$NAME")
SYM=$(readlink "$NAME")
Expand All @@ -29,9 +34,8 @@ canonicalize() {
echo "$NAME"
}

CONSOLE=$(dirname $(canonicalize "$0"))
APP=$(dirname "$CONSOLE")

exec php -q $CONSOLE/cake.php -working "$APP" "$@"
CONSOLE=$(dirname -- "$(canonicalize "$0")")
APP=`pwd`

exit;
exec php -q "$CONSOLE"/cake.php -working "$APP" "$@"
exit

0 comments on commit bcda684

Please sign in to comment.