Major overhauling and refactoring of Magallanes Command and Tasks modulairty and workflow.

ADVICE: there is no Backwards Compatibility with custom tasks, those
using the _config instance will be broken or those using the
getEnvironmentName().
This commit is contained in:
Andrés Montañez
2012-09-21 00:23:07 -03:00
parent 05b102b273
commit 811c83e13a
29 changed files with 803 additions and 639 deletions
+6 -5
View File
@@ -1,11 +1,12 @@
<?php
class Mage_Task_Install
class Mage_Command_BuiltIn_Install
extends Mage_Command_CommandAbstract
{
public function run ()
public function run()
{
Mage_Console::output('Installing <dark_gray>Magallanes</dark_gray>... ', 1, 0);
$this->_recursiveCopy('./', '/opt/magallanes-' . MAGALLANES_VERSION);
if (file_exists('/opt/magallanes') && is_link('/opt/magallanes')) {
unlink('/opt/magallanes');
}
@@ -18,7 +19,7 @@ class Mage_Task_Install
Mage_Console::output('<light_green>Success!</light_green>', 0, 2);
}
private function _recursiveCopy ($from, $to)
private function _recursiveCopy($from, $to)
{
if (is_dir($from)) {
mkdir($to);
@@ -38,7 +39,7 @@ class Mage_Task_Install
} else {
copy(
$from . DIRECTORY_SEPARATOR . $file,
$from . DIRECTORY_SEPARATOR . $file,
$to . DIRECTORY_SEPARATOR . $file
);
}