Magallanes');
// Check if there is already a config dir
if (file_exists($configDir)) {
Mage_Console::output('Error!! Already exists .mage directory.', 1, 2);
} else {
$results = array();
$results[] = mkdir($configDir);
$results[] = mkdir($configDir . '/logs');
$results[] = mkdir($configDir . '/tasks');
$results[] = mkdir($configDir . '/config');
$results[] = mkdir($configDir . '/config/environment');
$results[] = file_put_contents($configDir . '/config/general.yml', '#global settings' . PHP_EOL . PHP_EOL);
$results[] = file_put_contents($configDir . '/config/scm.yml', '#scm settings' . PHP_EOL . PHP_EOL);
if (!in_array(false, $results)) {
Mage_Console::output('Success!! The configuration for Magallanes has been generated at .mage directory.');
Mage_Console::output('Please!! Review and adjust the configuration.', 2, 2);
} else {
Mage_Console::output('Error!! Unable to generate the configuration.', 1, 2);
}
}
}
}