Project

General

Profile

Download (641 Bytes) Statistics
| Branch: | Tag: | Revision:
1
require_once("config.inc");
2
require_once("util.inc");
3
require_once("pkg-utils.inc");
4

    
5
global $g, $config, $argv, $command_split;
6

    
7
if (is_array($command_split)) {
8
	$args = array_slice($command_split, 1);
9
} else {
10
	$args = array_slice($argv, 2);
11
}
12

    
13
$pkg_name = $args[0];
14
$pkg_info = array();
15

    
16
echo "Removing package \"{$pkg_name}\"...\n";
17

    
18
foreach ($config['installedpackages']['package'] as $package) {
19
	if ($pkg_name == $package['name']) {
20
		$pkg_info = $package;
21
	}
22
}
23

    
24
$static_output = "";
25
$pkg_interface = "console";
26

    
27
if (empty($pkg_info)) {
28
	echo "\nPackage not installed.\n";
29
	return;
30
}
31

    
32
uninstall_package($pkg_name);
33

    
34
echo "\nDone.\n";
(18-18/18)