On Thu, 18 Oct 2001, Han wrote:

> Stefan van der Eijk ([EMAIL PROTECTED]) wrote:
> > Han wrote:
> >>Stefan van der Eijk ([EMAIL PROTECTED]) wrote:
>
> >>>ls /mirrors/cooker/${HOSTTYPE}/Mandrake/RPMS \
>
> >>I am sure your script will fail on this line. What is the sollution?
>
> > It's the location on my disk where I've got cooker mirrored. It does
> > work here, what would be wrong with it?
>
> Nothing :) I just have to do it in a different way.

Like this?

#!/bin/sh
# get listing
mv -f .listing .listing.1
mv -f index.html index.html.1
wget -nr 
ftp://ftp.surfnet.nl/pub/os/Linux/distr/Mandrake/Mandrake-devel/cooker/i586/Mandrake/RPMS/
# transform listing into usable format to file "listing"
mv -f listing listing.1
cut -b 56- .listing |sort |uniq >listing
# get rpm names
A=`rpm -qa |sort|uniq`
# download rpms
for i in $A; do if ! grep ${i}.i586.rpm listing >/dev/null; then echo ${i}.i586.rpm; 
fi; done


    Christiaan


Reply via email to