mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
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:
parent
22adcb07a1
commit
883d8a963c
7 changed files with 46 additions and 44 deletions
|
@ -105,9 +105,9 @@
|
|||
*/
|
||||
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.
|
||||
*/
|
||||
|
|
|
@ -24,12 +24,14 @@
|
|||
# @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
#
|
||||
################################################################################
|
||||
clear
|
||||
|
||||
LIB=${0/%cake/};
|
||||
APP=`pwd`/;
|
||||
LIB=${0/%cake/}
|
||||
APP=`pwd`/
|
||||
|
||||
exec php -q ${LIB}dispatch.php "$@" -working "${APP}"
|
||||
echo "Hello $USER,"
|
||||
|
||||
exec php -q ${LIB}cake.php "$@" -working "${APP}"
|
||||
|
||||
echo " ";
|
||||
|
||||
exit;
|
|
@ -6,6 +6,6 @@
|
|||
SET app=%0
|
||||
SET lib=%~dp0
|
||||
|
||||
php -q %lib%dispatch.php %* -working "%CD%\"
|
||||
php -q %lib%cake.php %* -working "%CD%\"
|
||||
|
||||
echo.
|
|
@ -152,7 +152,7 @@ class ConsoleDispatcher {
|
|||
if (!isset($this->args[0]) || !isset($this->params['working'])) {
|
||||
$this->stdout("\nCakePHP Console: ");
|
||||
$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('(http://manual.cakephp.org/)');
|
||||
exit();
|
||||
|
@ -176,9 +176,9 @@ class ConsoleDispatcher {
|
|||
$this->shiftArgs();
|
||||
|
||||
$this->scriptPaths = array(
|
||||
VENDORS . 'scritps' . DS,
|
||||
VENDORS . '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')) {
|
||||
$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 {
|
||||
$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));
|
||||
exit();
|
||||
} else {
|
||||
require SCRIPTS . 'cake_script.php';
|
||||
require CONSOLE_LIBS . 'cake_script.php';
|
||||
require $this->scriptPath;
|
||||
if(class_exists($this->scriptClass)) {
|
||||
$script = new $this->scriptClass($this);
|
||||
|
@ -313,8 +313,8 @@ class ConsoleDispatcher {
|
|||
}
|
||||
} else {
|
||||
$this->stdout('Available Scripts:');
|
||||
foreach (listClasses(CAKE . 'scripts') as $script) {
|
||||
if ($script != 'dispatch.php' && $script != 'cake_script.php') {
|
||||
foreach (listClasses(CONSOLE_LIBS) as $script) {
|
||||
if ($script != 'cake_script.php') {
|
||||
$this->stdout("\t - " . r('.php', '', $script));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1815,12 +1815,12 @@ class BakeScript extends CakeScript {
|
|||
*/
|
||||
function __buildDirLayout($projectPath, $appName) {
|
||||
$skel = '';
|
||||
if($this->__checkPath(CAKE_CORE_INCLUDE_PATH.DS.'cake'.DS.'scripts'.DS.'templates'.DS.'skel') === true) {
|
||||
$skel = CAKE_CORE_INCLUDE_PATH.DS.'cake'.DS.'scripts'.DS.'templates'.DS.'skel';
|
||||
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.'console'.DS.'libs'.DS.'templates'.DS.'skel';
|
||||
} else {
|
||||
|
||||
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 == '') {
|
||||
$this->out('The directory path you supplied was empty. Please try again.');
|
||||
|
|
|
@ -62,7 +62,7 @@ class Bake2Script extends CakeScript {
|
|||
}
|
||||
|
||||
if ($loaded) {
|
||||
require SCRIPTS . 'tasks' . DS . 'bake_task.php';
|
||||
require CONSOLE_LIBS . 'tasks' . DS . 'bake_task.php';
|
||||
require $this->taskPath;
|
||||
|
||||
$this->taskClass = $taskName.'Task';
|
||||
|
|
|
@ -30,7 +30,7 @@ class AppTask extends BakeTask {
|
|||
|
||||
function execute($params) {
|
||||
if (count($params) == 2) {
|
||||
$skel = SCRIPTS.'templates'.DS.'skel';
|
||||
$skel = CONSOLE_LIBS .'templates'.DS.'skel';
|
||||
$this->copydirr($skel, $params[1], 0755);
|
||||
$this->makeTmpWritable($params[1].DS.'tmp');
|
||||
$this->addAppAlias($params[0], $params[1]);
|
||||
|
|
Loading…
Add table
Reference in a new issue