Skip to content

Commit

Permalink
1.3: Added resolution of symbolic links in cake CLI bash script.
Browse files Browse the repository at this point in the history
Removing newlines from end of file.
  • Loading branch information
Thomas Ploch authored and lorenzo committed Oct 15, 2011
1 parent ab88f3e commit 3b8ca96
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions cake/console/cake
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,24 @@
# Licensed under The MIT License
# Redistributions of files must retain the above copyright notice.
#
# @copyright Copyright 2005-2011, Cake Software Foundation, Inc.
# @link http://cakephp.org CakePHP(tm) Project
# @package cake
# @subpackage cake.cake.console
# @since CakePHP(tm) v 1.2.0.5012
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
# @copyright Copyright 2005-2011, Cake Software Foundation, Inc.
# @link http://cakephp.org CakePHP(tm) Project
# @package Cake
# @subpackage Cake.Console
# @since CakePHP(tm) v 1.2.0.5012
# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
#
################################################################################
LIB=${0/%cake/}
LIB=${0}
SYM=$(readlink "$0")

if [ ! -n "$SYM" ]
then
LIB=${LIB%/*}"/"
else
LIB=${SYM%/*}"/"
fi

APP=`pwd`

exec php -q ${LIB}cake.php -working "${APP}" "$@"
Expand Down

0 comments on commit 3b8ca96

Please sign in to comment.