php-src/pear/scripts/pearcmd-list.php
Stig Bakken 615f110d4e * modularize "pear" and "pear-get" commands somewhat. checking options
etc. is done for both in pearcmd-common.php.
2002-01-30 12:20:12 +00:00

21 lines
477 B
PHP

<?php
$reg = new PEAR_Registry;
$installed = $reg->packageInfo();
$i = $j = 0;
heading("Installed packages:");
foreach ($installed as $package) {
if ($i++ % 20 == 0) {
if ($j++ > 0) {
print "\n";
}
printf("%-20s %-10s %s\n",
"Package", "Version", "State");
print str_repeat("-", 75)."\n";
}
printf("%-20s %-10s %s\n", $package['package'],
$package['version'], $package['release_state']);
}
?>