diff options
author | Tomas V.V.Cox <cox@php.net> | 2001-05-23 14:38:09 +0000 |
---|---|---|
committer | Tomas V.V.Cox <cox@php.net> | 2001-05-23 14:38:09 +0000 |
commit | 881f74263a908e480fc6d3203fd5128d7cbe1ef3 (patch) | |
tree | 78fc32d1932d1583576afdb829c1a5b80220c65d | |
parent | 9f0a61955378767328c1fc450f8a893c2b3af6f4 (diff) | |
download | php-git-881f74263a908e480fc6d3203fd5128d7cbe1ef3.tar.gz |
-Changed $param[0] to $param{0} less ambiguous
-Readd "-?" param that shows the usage msg
-rw-r--r-- | pear/scripts/pear.in | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pear/scripts/pear.in b/pear/scripts/pear.in index 7558b53897..41fdde598d 100644 --- a/pear/scripts/pear.in +++ b/pear/scripts/pear.in @@ -25,7 +25,7 @@ require_once 'Console/Getopt.php'; error_reporting(E_ALL ^ E_NOTICE); -$options = Console_Getopt::getopt($argv, "hv:e:p:d:"); +$options = Console_Getopt::getopt($argv, "h?v:e:p:d:"); if (PEAR::isError($options)) { usage($options); } @@ -38,19 +38,19 @@ foreach ($opts as $opt) { $verbose = $param; break; case 'e': - if ($param[0] != DIRECTORY_SEPARATOR) { + if ($param{0} != DIRECTORY_SEPARATOR) { usage (new PEAR_Error("no absolute path (ej. /usr/lib/php)\n")); } $ext_dir = $param; break; case 'p': - if ($param[0] != DIRECTORY_SEPARATOR) { + if ($param{0} != DIRECTORY_SEPARATOR) { usage (new PEAR_Error("no absolute path (ej. /usr/lib/php)\n")); } $script_dir = $param; break; case 'd': - if ($param[0] != DIRECTORY_SEPARATOR) { + if ($param{0} != DIRECTORY_SEPARATOR) { usage (new PEAR_Error("no absolute path (ej. /usr/lib/php)\n")); } $doc_dir = $param; @@ -104,7 +104,7 @@ function usage($obj = null) " -p <dir> set script install dir (absolute path)\n". " -e <dir> set extension install dir (absolute path)\n". " -d <dir> set documentation dest dir (absolute path)\n". - " -h display help/usage (this message)\n". + " -h, -? display help/usage (this message)\n". "Commands:\n". " install <package file>\n". " package [package info file]\n". |