Commit 0e5d76e7 authored by M. Dent's avatar M. Dent Committed by Mario

Add reload to util/addons

parent fe80f817
......@@ -10,6 +10,7 @@ echo <<< EOT
util/addons list all # list all addons (*)= installed, (!)= disabled due to version compatibility
util/addons install foo # install addon named 'foo'
util/addons uninstall foo # uninstall addon named 'foo'
util/addons reinstall # reinstall all plugins
EOT;
}
......@@ -68,6 +69,20 @@ if($argc == 2 && $argv[1] === 'list') {
killme();
}
if($argc == 2 && $argv[1] === 'reinstall') {
require_once("include/plugin.php");
if($plugins) {
foreach($plugins as $p) {
if($p[1]) {
echo "Reinstall: ". $p[0] . "\n";
uninstall_plugin($p[0]);
install_plugin($p[0]);
}
}
}
killme();
}
if($argc == 3 && $argv[1] === 'list' && $argv[2] === 'all') {
if($plugins) {
......
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