Correcting line endings on bash script.

Starting to correct paths to new console directory.
Replaced SCRIPTS define with CONSOLE_LIBS

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5020 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-05-05 06:00:38 +00:00
parent 22adcb07a1
commit 883d8a963c
7 changed files with 46 additions and 44 deletions

View file

@ -105,9 +105,9 @@
*/ */
define ('IMAGES', WWW_ROOT.'img'.DS); define ('IMAGES', WWW_ROOT.'img'.DS);
/** /**
* Path to the scripts direcotry. * Path to the console libs direcotry.
*/ */
define('SCRIPTS', CAKE.'scripts'.DS); define('CONSOLE_LIBS', CAKE.'console'.DS.'libs'.DS);
/** /**
* Path to the tests directory. * Path to the tests directory.
*/ */

View file

@ -24,12 +24,14 @@
# @license http://www.opensource.org/licenses/mit-license.php The MIT License # @license http://www.opensource.org/licenses/mit-license.php The MIT License
# #
################################################################################ ################################################################################
clear
LIB=${0/%cake/}; LIB=${0/%cake/}
APP=`pwd`/; APP=`pwd`/
exec php -q ${LIB}dispatch.php "$@" -working "${APP}" echo "Hello $USER,"
exec php -q ${LIB}cake.php "$@" -working "${APP}"
echo " "; echo " ";
exit; exit;

View file

@ -6,6 +6,6 @@
SET app=%0 SET app=%0
SET lib=%~dp0 SET lib=%~dp0
php -q %lib%dispatch.php %* -working "%CD%\" php -q %lib%cake.php %* -working "%CD%\"
echo. echo.

View file

@ -152,7 +152,7 @@ class ConsoleDispatcher {
if (!isset($this->args[0]) || !isset($this->params['working'])) { if (!isset($this->args[0]) || !isset($this->params['working'])) {
$this->stdout("\nCakePHP Console: "); $this->stdout("\nCakePHP Console: ");
$this->stdout('This file has been loaded incorrectly and cannot continue.'); $this->stdout('This file has been loaded incorrectly and cannot continue.');
$this->stdout('Please make sure that ' . DIRECTORY_SEPARATOR . 'cake' . DIRECTORY_SEPARATOR . 'scripts is in your system path,'); $this->stdout('Please make sure that ' . DIRECTORY_SEPARATOR . 'cake' . DIRECTORY_SEPARATOR . 'console is in your system path,');
$this->stdout('and check the manual for the correct usage of this command.'); $this->stdout('and check the manual for the correct usage of this command.');
$this->stdout('(http://manual.cakephp.org/)'); $this->stdout('(http://manual.cakephp.org/)');
exit(); exit();
@ -176,9 +176,9 @@ class ConsoleDispatcher {
$this->shiftArgs(); $this->shiftArgs();
$this->scriptPaths = array( $this->scriptPaths = array(
VENDORS . 'scritps' . DS, VENDORS . 'scripts' . DS,
APP . 'vendors' . DS . 'scripts' . DS, APP . 'vendors' . DS . 'scripts' . DS,
SCRIPTS CONSOLE_LIBS
); );
} }
/** /**
@ -198,7 +198,7 @@ class ConsoleDispatcher {
); );
if(!file_exists(APP_PATH . 'config' . DS . 'core.php')) { if(!file_exists(APP_PATH . 'config' . DS . 'core.php')) {
$includes[] = CORE_PATH . 'cake' . DS . 'scripts'.DS.'templates'.DS.'skel'.DS.'config'.DS.'core.php'; $includes[] = CORE_PATH . 'cake' . DS . 'console' . DS . 'libs' . DS . 'templates' . DS . 'skel' . DS . 'config' . DS . 'core.php';
} else { } else {
$includes[] = APP_PATH . 'config' . DS . 'core.php'; $includes[] = APP_PATH . 'config' . DS . 'core.php';
} }
@ -265,7 +265,7 @@ class ConsoleDispatcher {
$this->stdout("'{$script}.php' does not exist in: \n" . implode("\nor ", $this->scriptPaths)); $this->stdout("'{$script}.php' does not exist in: \n" . implode("\nor ", $this->scriptPaths));
exit(); exit();
} else { } else {
require SCRIPTS . 'cake_script.php'; require CONSOLE_LIBS . 'cake_script.php';
require $this->scriptPath; require $this->scriptPath;
if(class_exists($this->scriptClass)) { if(class_exists($this->scriptClass)) {
$script = new $this->scriptClass($this); $script = new $this->scriptClass($this);
@ -313,8 +313,8 @@ class ConsoleDispatcher {
} }
} else { } else {
$this->stdout('Available Scripts:'); $this->stdout('Available Scripts:');
foreach (listClasses(CAKE . 'scripts') as $script) { foreach (listClasses(CONSOLE_LIBS) as $script) {
if ($script != 'dispatch.php' && $script != 'cake_script.php') { if ($script != 'cake_script.php') {
$this->stdout("\t - " . r('.php', '', $script)); $this->stdout("\t - " . r('.php', '', $script));
} }
} }

View file

@ -1815,12 +1815,12 @@ class BakeScript extends CakeScript {
*/ */
function __buildDirLayout($projectPath, $appName) { function __buildDirLayout($projectPath, $appName) {
$skel = ''; $skel = '';
if($this->__checkPath(CAKE_CORE_INCLUDE_PATH.DS.'cake'.DS.'scripts'.DS.'templates'.DS.'skel') === true) { if($this->__checkPath(CAKE_CORE_INCLUDE_PATH.DS.'cake'.DS.'console'.DS.'libs'.DS.'templates'.DS.'skel') === true) {
$skel = CAKE_CORE_INCLUDE_PATH.DS.'cake'.DS.'scripts'.DS.'templates'.DS.'skel'; $skel = CAKE_CORE_INCLUDE_PATH.DS.'cake'.DS.'console'.DS.'libs'.DS.'templates'.DS.'skel';
} else { } else {
while ($skel == '') { while ($skel == '') {
$skel = $this->in("What is the full path for the cake install app directory?\nExample: ", null, ROOT.'myapp'.DS); $skel = $this->in("What is the full path for the cake install app directory?\nExample: ", null, ROOT.DS.'myapp'.DS);
if ($skel == '') { if ($skel == '') {
$this->out('The directory path you supplied was empty. Please try again.'); $this->out('The directory path you supplied was empty. Please try again.');

View file

@ -62,7 +62,7 @@ class Bake2Script extends CakeScript {
} }
if ($loaded) { if ($loaded) {
require SCRIPTS . 'tasks' . DS . 'bake_task.php'; require CONSOLE_LIBS . 'tasks' . DS . 'bake_task.php';
require $this->taskPath; require $this->taskPath;
$this->taskClass = $taskName.'Task'; $this->taskClass = $taskName.'Task';

View file

@ -30,7 +30,7 @@ class AppTask extends BakeTask {
function execute($params) { function execute($params) {
if (count($params) == 2) { if (count($params) == 2) {
$skel = SCRIPTS.'templates'.DS.'skel'; $skel = CONSOLE_LIBS .'templates'.DS.'skel';
$this->copydirr($skel, $params[1], 0755); $this->copydirr($skel, $params[1], 0755);
$this->makeTmpWritable($params[1].DS.'tmp'); $this->makeTmpWritable($params[1].DS.'tmp');
$this->addAppAlias($params[0], $params[1]); $this->addAppAlias($params[0], $params[1]);