Commit 72b935f4 authored by Marius Burkard's avatar Marius Burkard

- added --force option for addon installer

parent ad447c27
......@@ -44,6 +44,7 @@ if(!isset($_SERVER['argv'])) {
$action = '';
$package = '';
$force = false;
$argv = $_SERVER['argv'];
for($a = 1; $a < count($argv); $a++) {
......@@ -52,6 +53,8 @@ for($a = 1; $a < count($argv); $a++) {
$action = 'install';
} elseif($argv[$a] === '--uninstall' || $argv[$a] === 'uninstall') {
$action = 'uninstall';
} elseif($argv[$a] === '--force') {
$force = true;
} elseif(substr($argv[$a], -4) === '.pkg' && is_file($argv[$a])) {
$package = $argv[$a];
} else {
......@@ -63,7 +66,7 @@ if($action == 'uninstall') {
die('Automatic uninstall not supported, yet.');
} else {
try {
$app->addon_installer->installAddon($package);
$app->addon_installer->installAddon($package, $force);
} catch(Exception $e) {
die('Error: ' . $e->getMessage() . "\n");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment