cake 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. ################################################################################
  3. #
  4. # Bake is a shell script for running CakePHP bake script
  5. # PHP 5
  6. #
  7. # CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  8. # Copyright 2005-2011, Cake Software Foundation, Inc.
  9. #
  10. # Licensed under The MIT License
  11. # Redistributions of files must retain the above copyright notice.
  12. #
  13. # @copyright Copyright 2005-2011, Cake Software Foundation, Inc.
  14. # @link http://cakephp.org CakePHP(tm) Project
  15. # @package app.Console
  16. # @since CakePHP(tm) v 2.0
  17. # @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  18. #
  19. ################################################################################
  20. LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0")
  21. while [ -h "$LIB" ]; do
  22. DIR=$(dirname -- "$LIB")
  23. SYM=$(readlink "$LIB")
  24. LIB=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
  25. done
  26. LIB=$(dirname -- "$LIB")/
  27. APP=`pwd`
  28. exec php -q "$LIB"cake.php -working "$APP" "$@"
  29. exit;