root/etc/phpshellsessions/listpkg @ ec66caa6
1 | 5823264a | jim-p | require_once("config.inc"); |
---|---|---|---|
2 | require_once("util.inc"); |
||
3 | |||
4 | global $g, $config; |
||
5 | |||
6 | echo "Installed packages:\n"; |
||
7 | |||
8 | foreach($config['installedpackages']['package'] as $package) { |
||
9 | $name = str_pad("{$package['name']}-{$package['version']}", 30); |
||
10 | $descr = $package['descr']; |
||
11 | $line = "{$name} {$descr}"; |
||
12 | if (strlen($line) > 80) |
||
13 | $line = substr($line, 0, 77) . "..."; |
||
14 | echo "{$line}\n"; |
||
15 | } |