On Apr 5, 2005, at 1:27 am, Grant wrote:

Each line in your links.txt is a list of different mirror urls for the
same package separated by '%20'.
This should take the first link from every line and pass it to wget:
cat links.txt | sed -e 's/%20.*//' | xargs -n 1 wget
or alternatively:
sed -e 's/%20.*//' <links.txt >links1.txt
wget -i links1.txt
...
Actually that first line of code ends up trying to download the same
file over and over.

Won't wget's "-c" flag resolve this?

IE:
  sed -e 's/%20.*//' <links.txt >links1.txt && wget -ci links1.txt
or perhaps (I haven't tested):
  sed -e 's/%20.*//' <links.txt >links1.txt | wget -ci

In any case `man wget` is your friend.

I think there are a bunch of different paths
specified for each file so it can always find one that works.

Uh.. that's the point. The file is a list of full paths to the file(s) on all the mirrors specified in the make.conf on the machine that created it. Thus one can be sure that when one takes the links.txt to another machine & downloads the files it won't fail simply because a single mirror is inaccessible.


Stroller.

--
gentoo-user@gentoo.org mailing list



Reply via email to