php-src/pear/scripts/pearcmd-remote-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

24 lines
638 B
PHP

<?php
$remote = new PEAR_Remote($config);
$result = $remote->call('package.listAll', 1);
$i = $j = 0;
heading("Available packages");
foreach ($result as $package => $info) {
if ($i++ % 20 == 0) {
if ($j++ > 0) {
print "\n";
}
printf("%-20s %-10s %-15s %s\n",
"Package", "Stable", "Lead", "Category");
print str_repeat("-", 75)."\n";
}
if (empty($info['stable'])) {
$info['stable'] = '(none)';
}
$stable = (string)$info['stable'];
printf("%-20s %-10s %-15s %s\n", $info['name'],
$info['stable'], $info['lead'], $info['category']);
}
?>