summaryrefslogtreecommitdiffstats
path: root/src/etc/phpshellsessions/listpkg
blob: ed2c793755c0efeded104d20faca61b88b0bc5a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require_once("config.inc");
require_once("util.inc");

global $g, $config;

echo "Installed packages:\n";

foreach ($config['installedpackages']['package'] as $package) {
	$name = str_pad("{$package['name']}-{$package['version']}", 30);
	$descr = $package['descr'];
	$line = "{$name} {$descr}";
	if (strlen($line) > 80) {
		$line = substr($line, 0, 77) . "...";
	}
	echo "{$line}\n";
}
OpenPOWER on IntegriCloud