Re: [Patch] Correct executable name for PEAR installer
| From: | Martin Jansen | Date: | Wed, 04 Jun 2003 16:31:39 +0000 |
| Subject: | Re: [Patch] Correct executable name for PEAR installer | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-17015@lists.php.net to get a copy of this message | ||
On Wed Jun 04, 2003 at 06:2446PM +0200, Martin Jansen wrote:
> the attached patch fixes the problem that the PEAR installer identifies
> itself as "pearcmd.php" in the help text when being invoked via
>
> $ pear
>
> without any further options
Whups, the previous patch broke the installer. The attached one should
work as expected.
--
- Martin Martin Jansen
http://martinjansen.com/
? scripts.diff Index: pear.sh =================================================================== RCS file: /repository/php4/pear/scripts/pear.sh,v retrieving revision 1.2 diff -u -r1.2 pear.sh --- pear.sh 4 Apr 2003 00:15:53 -0000 1.2 +++ pear.sh 4 Jun 2003 16:30:40 -0000 @@ -25,4 +25,4 @@ fi fi -exec $PHP -C -q $INCARG -d output_buffering=1 $INCDIR/pearcmd.php $@ +exec $PHP -C -q $INCARG -d output_buffering=1 $INCDIR/pearcmd.php $0 $@ Index: pearcmd.php =================================================================== RCS file: /repository/php4/pear/scripts/pearcmd.php,v retrieving revision 1.1 diff -u -r1.1 pearcmd.php --- pearcmd.php 3 Apr 2003 23:48:39 -0000 1.1 +++ pearcmd.php 4 Jun 2003 16:30:41 -0000 @@ -47,7 +47,8 @@ $all_commands = PEAR_Command::getCommands(); $argv = Console_Getopt::readPHPArgv(); -$progname = basename($argv[0]); +$progname = basename($argv[1]); +unset($argv[1]); $options = Console_Getopt::getopt($argv, "c:C:d:D:Gh?sSqu:vV"); if (PEAR::isError($options)) { usage($options);
? scripts.diff Index: pear.sh =================================================================== RCS file: /repository/php4/pear/scripts/pear.sh,v retrieving revision 1.2 diff -u -r1.2 pear.sh --- pear.sh 4 Apr 2003 00:15:53 -0000 1.2 +++ pear.sh 4 Jun 2003 16:30:40 -0000 @@ -25,4 +25,4 @@ fi fi -exec $PHP -C -q $INCARG -d output_buffering=1 $INCDIR/pearcmd.php $@ +exec $PHP -C -q $INCARG -d output_buffering=1 $INCDIR/pearcmd.php $0 $@ Index: pearcmd.php =================================================================== RCS file: /repository/php4/pear/scripts/pearcmd.php,v retrieving revision 1.1 diff -u -r1.1 pearcmd.php --- pearcmd.php 3 Apr 2003 23:48:39 -0000 1.1 +++ pearcmd.php 4 Jun 2003 16:30:41 -0000 @@ -47,7 +47,8 @@ $all_commands = PEAR_Command::getCommands(); $argv = Console_Getopt::readPHPArgv(); -$progname = basename($argv[0]); +$progname = basename($argv[1]); +unset($argv[1]); $options = Console_Getopt::getopt($argv, "c:C:d:D:Gh?sSqu:vV"); if (PEAR::isError($options)) { usage($options);