Re: Re: (Fwd) RE : [PEAR] How to install all downloaded packages in on

From: Date: Sat, 10 Apr 2004 15:51:23 +0000
Subject: Re: Re: (Fwd) RE : [PEAR] How to install all downloaded packages in on
References: 1 2  Groups: php.pear.core 
Request: Send a blank email to pear-core+get-261@lists.php.net to get a copy of this message
Stefan Neufeind wrote:
Hmm, well you gave me again enough for some thouhgts on the topic. I didn't expect the installer to pull HTML* from the server :-)) I was mainly focusing on the local installation part - so you can install *.tgz or HTML_*.tgz or similar, that you have downloaded before (possibly with a download-all or similar). Would the wildcard-installation from the server be really useful? I would think this might be useful. Certainly the problem you're describing is not feasible if local wildcards are allowed. For local packages, I think a simple script is in order, something like:
@ECHO OFF php -d register_argc_argv = On list.php %1 <?php if (isset($argv[1])) { $a = @dir(.); $search = strtr($argv[1], array('?' => '.','*' => '.*','.' => '\\.','[' => '\\[',']' => '\\]','-' => '\\-'))); while ($a && $a->read = $entry) {
       if (strcmp($entry,".") != 0 && strcmp($entry,"..") != 0) {
           if (@preg_match('/' . $search . '/', $entry)) {
               echo "$entry ";
           }
       }
} } ?> Then you can do pear install < listwildcards.bat *.tgz I didn't test the script, so it may require some tweaking. Most noteably, it assumes there are no spaces in any files that match, and that "php" is in the path and is the cli version. It also assumes there are no path separators in the wildcards, and that all files are in the current directory. Greg

« previous php.pear.core (#261) next »