cake 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/env 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-2012, 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-2012, 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. ME=$(readlink -f $0)
  21. LIB=$(cd -P -- "$(dirname -- "$ME")" && pwd -P) && LIB=$LIB/$(basename -- "$ME")
  22. while [ -h "$LIB" ]; do
  23. DIR=$(dirname -- "$LIB")
  24. SYM=$(readlink "$LIB")
  25. LIB=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
  26. done
  27. LIB=$(dirname -- "$LIB")/
  28. APP=$(dirname $(cd $(dirname $ME) && pwd))
  29. exec php -q "$LIB"cake.php -working "$APP" "$@"
  30. exit;