Re: manual installation of PEAR packages
| From: | Pierre-Alain Joye | Date: | Sat, 31 Jan 2004 22:37:01 +0000 |
| Subject: | Re: manual installation of PEAR packages | ||
| References: | 1 2 3 4 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-2286@lists.php.net to get a copy of this message | ||
On Sat, 31 Jan 2004 17:28:03 -0500
Greg Beaver <cellog@php.net> wrote:
> You know what would be great is to allow ftp install.
>
> In other words, with a given ftp user/pass and an install directory,
> all you need is to have PEAR read the .pearrc from the ftp directory,
> and then extract all files over there.
well see the little script below (I drop many things as it is my sync
script, but I tried to keep the essence ;). You need ncftpput or any
foobar ftp console client.
However I do not think it's a priority for now and even not sure about
its usefullness.
--------------------
#!/bin/bash
pathpear=/usr/local/lib/php
remotepath=./pear
hosts=( [0]="user1 pass1 host1" [1]="user2 pass2 host2" )
element_count=${#hosts[@]}
index=0
while [ "$index" -lt "$element_count" ]
do
cur=( $(echo ${hosts[$index]}) )
user=${cur[@]:0:1}
pass=${cur[@]:1:1}
host=${cur[@]:2:1}
cmd="ncftpput -R -u $user -p $pass $host $remotepath $pathpear"
echo $cmd
let "index = $index + 1"
done
--------------------
> The reason extracting locally and uploading is unlikely to work is
> that many PEAR packages use replacements, and that won't do well if
> they aren't replaced.
It is not what I said. I talked about a ftp mirror :)
It's not difficult to implement what you said but it's out of the
context of PEAR. There are plenty of efficient mirroring/ftp/rsync tools
overthere. We do not need to add more source of bugs in the core ;)
pierre