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

Auke Kok sofar at lunar-linux.org
Mon Nov 22 11:19:32 UTC 2004


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:
Adding a 'FRESORT_URL'. This feature allows you to download first from a central repository. Please do not tell people to use this on our own mirrors (except strikers' mirror ;^)).


Index: download.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/download.lunar,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- download.lunar	20 Nov 2004 23:00:37 -0000	1.43
+++ download.lunar	22 Nov 2004 11:19:30 -0000	1.44
@@ -314,15 +314,26 @@
       cp ${1/file:/} $2
     else
       # ordinary URL's handled by fuzzy_wget
+      connect &&
       if [ -n "$BASE_URL" ] ; then
-        URL=$BASE_URL/$(basename $2)
-      fi
-      connect          &&
-      if [ -n "$BASE_URL" ] ; then
+        # base url set means we don't touch the other possibilities:
         fuzzy_wget $BASE_URL/$(basename $2) $2
-      elif ! fuzzy_wget $1 $2 ; then
-        if [ -n "$LRESORT_URL" ] ; then
-          fuzzy_wget $LRESORT_URL/$(basename $2) $2
+      else
+        if [ -n "$FRESORT_URL" ] ; then
+          # try fresort first
+          if ! fuzzy_wget $FRESORT_URL/$(basename $2) $2 ; then
+            # normal url second
+            if ! fuzzy_wget $1 $2 ; then
+              # and failover
+              fuzzy_wget $LRESORT_URL/$(basename $2) $2
+            fi
+          fi
+        elif ! fuzzy_wget $1 $2 ; then
+          # just try the normal url
+          if [ -n "$LRESORT_URL" ] ; then
+            # and the failover url
+            fuzzy_wget $LRESORT_URL/$(basename $2) $2
+          fi
         fi
       fi
     fi



More information about the Lunar-commits mailing list