--- rock-old/base-config/ruby/ruby.conf Tue Dec 11 09:35:21 2001 +++ rock-new/base-config/ruby/ruby.conf Wed Dec 12 16:12:51 2001 @@ -3,7 +3,7 @@ # # maintainer: Pjotr Prins # -# $Id: pjotr-rock-patch-20011213,v 1.1 2001/12/13 11:40:12 wrk Exp $ +# $Id: pjotr-rock-patch-20011213,v 1.1 2001/12/13 11:40:12 wrk Exp $ # # 20010111 First edition # 20011126 Moved into base --- rock-old/scripts/Download Wed Dec 12 06:17:47 2001 +++ rock-new/scripts/Download Thu Dec 13 11:29:53 2001 @@ -210,7 +210,7 @@ if [ "j$htmlchk" != "j" ]; then echo "It's an HTML page, probably want to check this by hand!" echo "File not found, making a note of it." - echo $gzfile >> src/Not-Found + echo $location$gzfile >> src/Not-Found mv $gzfile ${gzfile}.html fi ;; @@ -243,7 +243,7 @@ echo "It's an HTML page, probably want to check this by hand!" mv $gzfile ${gzfile}.html echo "File not found, making a note of it." - echo $gzfile >> src/Not-Found + echo $location$gzfile >> src/Not-Found gotany=0 else echo "We got ${gotany}K of it, but as we don't know how big it is" @@ -263,7 +263,7 @@ if [ "j$gotany" != "j" ]; then echo "File not found, making a note of it." - echo $gzfile >> src/Not-Found + echo $location$gzfile >> src/Not-Found else echo "Got nothing?" fi @@ -343,27 +343,31 @@ else # cksum-err file alread exists: echo "Found $gzfile.cksum-err -> skip download." -# A line to seperate sections on the screen for easyer reading. - echo " -----------" + # A line to separate sections on the screen for easyer reading. + echo " -----------" rm -f "$lkfile" ; return 1 fi elif [ ! -s "$gzfile" ] ; then -# For now ignoring wget_it's return value, but it is the percentage of the file -# that was retrived or the size of the file retrived if negative. - notFound=`egrep "$gzfile" src/Not-Found \ + # For now ignoring wget_it's return value, but it is the + # percentage of the file that was retrieved or the size + # of the file retrieved if negative. + notFound=`egrep "$location$gzfile" src/Not-Found \ 2> /dev/null | head -1` if [ "j$notFound" = "j" ]; then wget_it $gzfile $url "$wget_options" else - echo "File previousely not found, so skipping." + echo "Location=[$location]" + echo "gzfile=[$gzfile]" + echo "File previously not found, so skipping." fi fi if [ ! -s "$gzfile" ]; then -# echo "*********** 0 size or no file, deleting junk." -# CAREFUL! DON'T do 'rm -f "$gzfile*" as that will trash the '.incomplete' file. + # echo "*********** 0 size or no file, deleting junk." + # CAREFUL! DON'T do 'rm -f "$gzfile*" as that will trash i + # the '.incomplete' file. rm -f "$gzfile" "$gzfile.[^i]*" "$lkfile" -# A line to seperate sections on the screen for easyer reading. + # A line to seperate sections on the screen for easyer reading. echo " -----------" return 1 fi @@ -396,7 +400,7 @@ cksum_chk "$gzfile" $cksum "$gzfile" fi -# A line to seperate sections on the screen for easyer reading. + # A line to seperate sections on the screen for easy reading. echo " -----------" # Free Lock @@ -415,16 +419,26 @@ for y in base-archive ext-archive ext-config opt-archive ; do if [[ "$1" == $y/* ]] ; then + # $1 contains the path to a tarball. Store the $pkg/tarball + # in x: x="`echo $1 | sed s,$y/,,`" + # grep all instances from INDEX if grep -q " $x " $y/INDEX ; then - line="`grep " $x " $y/INDEX | tr -s ' ' | tr ' ' '\t'`" - file="$y/`echo "$line" | cut -f2`" - url="`echo "$line" | cut -f3`" - cksum="`echo "$line" | cut -f1`" - mkdir -p "`dirname \"$file\"`" - download_file "$file" "$url" "$cksum" - rmdir "`dirname \"$file\"`" 2> /dev/null - return 0 + lines="`grep " $x " $y/INDEX | tr -s ' ' | tr ' ' '\t'`" + # echo "lines=[$lines]" + echo "$lines" | while read line ; do + # echo "line=[$line]" + file="$y/`echo "$line" | cut -f2`" + url="`echo "$line" | cut -f3`" + cksum="`echo "$line" | cut -f1`" + # echo "handle_file:" + # echo "url=[$url]" + # echo "file=[$file]" + mkdir -p "`dirname \"$file\"`" + download_file "$file" "$url" "$cksum" + rmdir "`dirname \"$file\"`" 2> /dev/null + done + return 0 fi fi done @@ -516,7 +530,7 @@ echo "opt-archive/$b" fi done | while read fn - do $0 $options "$fn" ; done + do echo $fn ; $0 $options "$fn" ; done done done exit 0