cake.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/php -q
  2. <?php
  3. /**
  4. * Command-line code generation utility to automate programmer chores.
  5. *
  6. * PHP 5
  7. *
  8. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  9. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  10. *
  11. * Licensed under The MIT License
  12. * For full copyright and license information, please see the LICENSE.txt
  13. * Redistributions of files must retain the above copyright notice.
  14. *
  15. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  16. * @link http://cakephp.org CakePHP(tm) Project
  17. * @package app.Console
  18. * @since CakePHP(tm) v 2.0
  19. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  20. */
  21. $ds = DIRECTORY_SEPARATOR;
  22. $dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php';
  23. if (function_exists('ini_set')) {
  24. $root = dirname(dirname(dirname(__FILE__)));
  25. // the following line differs from its sibling
  26. // /lib/Cake/Console/Templates/skel/Console/cake.php
  27. ini_set('include_path', $root . $ds . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
  28. }
  29. if (!include($dispatcher)) {
  30. trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
  31. }
  32. unset($paths, $path, $dispatcher, $root, $ds);
  33. return ShellDispatcher::run($argv);