On Mon, Jul 09, 2007 at 19:23:56 +0100, José Santos wrote:
> I'm trying to make a DVD with the non-free etch repository because i
> don't have internet on my old toshiba laptop.
> So i found this scrip on the web:

[...]

> but it just doesn't work, i gives me this output:
> 
> wget: invalid option -- f
> Usage: wget [OPTION]... [URL]...
> 
> Try `wget --help' for more options.
> /home/un1xer/bin/debnf.sh: line 13:
> http://ftp.debian.org/debian/dists/etch/ChangeLog: No such file or directory

[...]

> sed: -e expression #1, char 1: unknown command: `%'
> No URLs found in Download.list.
> 
> My scripting ability's are not very good, could i ask if someone can
> figure whats wrong with it?

I think this is more or less how it is supposed to be:

------------------------------------------------------------------------
#!/bin/bash

SERVER=http://ftp.us.debian.org

PATH1=debian/dists/etch/non-free/binary-i386
PATH2=debian/dists/etch

wget --force-directories --no-host-directories \
    ${SERVER}/${PATH1}/Packages.gz \
    ${SERVER}/${PATH1}/Packages.bz2 \
    ${SERVER}/${PATH1}/Release \
    ${SERVER}/${PATH2}/ChangeLog \
    ${SERVER}/${PATH2}/Contents-i386.gz \
    ${SERVER}/${PATH2}/Release \
    ${SERVER}/${PATH2}/Release.gpg

gunzip <${PATH1}/Packages.gz | grep '^Filename: ' |\
    sed "s%^Filename: %${SERVER}/debian/%" > Download.list

wget --force-directories --no-host-directories \
     --input-file Download.list
------------------------------------------------------------------------

You can change the "us" in $SERVER if you wan to download from another
mirror.

-- 
Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |

Reply via email to