Skip to content
Permalink
Browse files

Changing the Plugin task to take the dirs to create from the App skel…

…eton
  • Loading branch information...
AD7six
AD7six committed Jul 29, 2009
1 parent 9092b25 commit b7b27e3f037b0d3367d5a3006faf894e8738a1f7
Showing with 11 additions and 20 deletions.
  1. +11 −20 cake/console/libs/tasks/plugin.php
@@ -140,29 +140,20 @@ function bake($plugin) {
if (strtolower($looksGood) == 'y') {
$verbose = $this->in(__('Do you want verbose output?', true), array('y', 'n'), 'n');
$skel = dirname(CONSOLE_LIBS) . DS . 'templates' . DS . 'skel';
$Skel =& new Folder($skel);
$Folder =& new Folder($this->path . $pluginPath);
$directories = array(
'config' . DS . 'sql',
'models' . DS . 'behaviors',
'controllers' . DS . 'components',
'views' . DS . 'helpers',
'tests' . DS . 'cases' . DS . 'components',
'tests' . DS . 'cases' . DS . 'helpers',
'tests' . DS . 'cases' . DS . 'behaviors',
'tests' . DS . 'cases' . DS . 'controllers',
'tests' . DS . 'cases' . DS . 'models',
'tests' . DS . 'groups',
'tests' . DS . 'fixtures',
'vendors' . DS . 'img',
'vendors' . DS . 'js',
'vendors' . DS . 'css',
'vendors' . DS . 'shells'
);
foreach ($directories as $directory) {
$dirPath = $this->path . $pluginPath . DS . $directory;
$allFiles = $Skel->findRecursive();
$directories = array();
foreach($allFiles as $file) {
$dir = ltrim(str_replace($skel, '', dirname($file)), DS);
if (!$dir || preg_match('@^(tmp|plugins)@', $dir) || in_array($dir, $directories)) {
continue;
}
$dirPath = $this->path . $pluginPath . DS . $dir;
$Folder->create($dirPath);
$File =& new File($dirPath . DS . 'empty', true);
$directories[] = $dir;
}
if (strtolower($verbose) == 'y') {

0 comments on commit b7b27e3

Please sign in to comment.
You can’t perform that action at this time.