[Lunar-commits] CVS: theedge/var/lib/lunar/functions download.lunar, 1.63, 1.64

Auke Kok sofar at lunar-linux.org
Tue Apr 26 07:35:54 UTC 2005


Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory espresso.foo-projects.org:/home/sofar/active/theedge/var/lib/lunar/functions

Modified Files:
	download.lunar 
Log Message:
Just making this piece of code structured: skip the nasty part if not needed with lget -u.


Index: download.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/download.lunar,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- download.lunar	25 Apr 2005 19:31:37 -0000	1.63
+++ download.lunar	26 Apr 2005 07:35:52 -0000	1.64
@@ -93,31 +93,31 @@
 				"${MESSAGE_COLOR}for module" \
 				"${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
 
-			# compose a list of URLS
-			ALL_URLS=
-			add_url $FRESORT_URL
-			for URL in $URLS ; do
-				add_url $URL
-				if [ "$EXHAUSTIVE" == "on" ]; then
-					# scan for hits agains known clusters of mirrors
-					for MLIST in $MIRRORS/*; do
-						for ALT in $(sed 's/.*\t\([^\t]*\)$/\1/g' $MLIST); do
-							if [ "${URL:0:${#ALT}}" == "$ALT" ] ; then
-								# compose the list of valid mirrors
-								REST=${URL:${#ALT}}
-								for HIT in $(sed 's/.*\t\([^\t]*\)$/\1/g' $MLIST); do
-									add_url ${HIT}${REST}
-								done
-							fi
-						done
-					done
-				fi
-			done
-			add_url $LRESORT_URL
-		
-		    # we did all this hard work and now we toss it out:
 		    if [ -n "$BASE_URL" ] ; then
+				# in case -u was passed:
 		        ALL_URLS=$BASE_URL
+			else
+				# compose a list of URLS
+				ALL_URLS=
+				add_url $FRESORT_URL
+				for URL in $URLS ; do
+					add_url $URL
+					if [ "$EXHAUSTIVE" == "on" ]; then
+						# scan for hits agains known clusters of mirrors
+						for MLIST in $MIRRORS/*; do
+							for ALT in $(sed 's/.*\t\([^\t]*\)$/\1/g' $MLIST); do
+								if [ "${URL:0:${#ALT}}" == "$ALT" ] ; then
+									# compose the list of valid mirrors
+									REST=${URL:${#ALT}}
+									for HIT in $(sed 's/.*\t\([^\t]*\)$/\1/g' $MLIST); do
+										add_url ${HIT}${REST}
+									done
+								fi
+							done
+						done
+					fi
+				done
+				add_url $LRESORT_URL
 		    fi
 
 			for URL in $ALL_URLS; do



More information about the Lunar-commits mailing list