From 8b48ff1a1393bffb35914570bd74fd0e1f3a458f Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 31 Oct 2004 10:16:18 +0000 Subject: [PATCH] Clifford Wolf: Fixed various ./scripts/Download bugs - Endless loop with no or wrong parameter - Always list files from nodist as missing - Ignore arch specific target stuff with -all [2004102718454019754] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@4707 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/Download | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/Download b/scripts/Download index 122fb8d55..9080fbad7 100755 --- a/scripts/Download +++ b/scripts/Download @@ -690,10 +690,11 @@ list_cksums() { list() { trap '' INT - list_dtags | awk '{print $3;}' | \ - while read ft; do - echo "download/mirror/${ft:0:1}/$ft" - done + + list_dtags | sed \ + -e "s,^$D2re[ ].*\($NODISTre\).*$,\2 download/nodist/\4/\3,;" \ + -e "s,^$D2re$,\2 download/mirror/\4/\3,;" | awk '{print $2;}' + trap INT } @@ -789,7 +790,7 @@ all() { done < <(descparser package/$repo/$pkg/$pkg.desc | grep '^\[D\] ') done - for each in target/*/download.txt; do + for each in target/*/download.txt target/*/*/download.txt; do target="`echo $each | cut -f2 -d/`" while read cksum file url flags ; do @@ -915,7 +916,7 @@ case "$1" in -sm) shift ; smpatches "$@" ;; - -*|"") exec $0 --help ;; + -*|"") exec $0 -help ;; *) mapped_packages "$@" ;; esac