From f705826052e62a3beb343d010582db2dee34d56d Mon Sep 17 00:00:00 2001 From: Stig Bakken Date: Tue, 13 Nov 2001 01:07:36 +0000 Subject: [PATCH] * command name changes --- pear/scripts/pear.in | 45 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/pear/scripts/pear.in b/pear/scripts/pear.in index 05fc817980..2784a4ed9a 100644 --- a/pear/scripts/pear.in +++ b/pear/scripts/pear.in @@ -18,6 +18,30 @@ // | Tomas V.V.Cox | // +----------------------------------------------------------------------+ // + + +/* + +command structure: + +* remote queries: +** list available packages +** list not-installed packages +** list upgrades + +** list packages by author +** list packages by category +** list packages by state + +* operations on package files: + +* installation commands: + +* package generation commands: + + + + */ require_once 'PEAR.php'; require_once 'PEAR/Common.php'; require_once 'PEAR/Config.php'; @@ -191,9 +215,9 @@ switch ($command) { } // }}} - // {{{ list + // {{{ list-installed - case 'list': { + case 'list-installed': { $reg = new PEAR_Registry; $installed = $reg->packageInfo(); $i = $j = 0; @@ -205,9 +229,8 @@ switch ($command) { } printf("%-20s %-10s %s\n", "Package", "Version", "State"); - print str_repeat("=", 75)."\n"; + print str_repeat("-", 75)."\n"; } - $stable = $package['stable']; printf("%-20s %-10s %s\n", $package['package'], $package['version'], $package['release_state']); } @@ -215,9 +238,9 @@ switch ($command) { } // }}} - // {{{ list-remote + // {{{ list-available - case 'list-remote': { + case 'list-available': { $remote = new PEAR_Remote($config); $result = $remote->call('package.listAll'); $i = $j = 0; @@ -229,7 +252,7 @@ switch ($command) { } printf("%-20s %-10s %-15s %s\n", "Package", "Stable", "Lead", "Category"); - print str_repeat("=", 75)."\n"; + print str_repeat("-", 75)."\n"; } $stable = $package['stable']; printf("%-20s %-10s %-15s %s\n", $package['name'], @@ -293,8 +316,9 @@ function usage($error = null) "Commands:\n". " install \n". " package [package info file]\n". - " list\n". - " list-remote\n". + " list-installed\n". + " list-available\n". + " info\n". " show-config\n". "\n"); fclose($stderr); @@ -302,6 +326,7 @@ function usage($error = null) } // }}} +// {{{ present_array() function present_array(&$arr, $keys = null) { @@ -320,6 +345,8 @@ function present_array(&$arr, $keys = null) } } +// }}} + /* * Local variables: -- 2.40.0