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

Auke Kok sofar at lunar-linux.org
Fri Nov 26 08:20:41 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:
Make it possible to do 'lget moonbase --url file:///path/to/moonbase.tar.bz2'


Index: download.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/download.lunar,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- download.lunar	22 Nov 2004 11:19:30 -0000	1.44
+++ download.lunar	26 Nov 2004 08:20:39 -0000	1.45
@@ -308,10 +308,14 @@
       URL="$CPAN_URL/${1:7}"
       FILE=$(basename $URL)
       get_url $URL $2
-    elif [ "${1:0:5}" == "file:" ] ; then
-      # adding this since wget is a bitch and will not fetch this... sigh
-      # this will copy file to $2... so you may use it as you like
-      cp ${1/file:/} $2
+
+    # adding this since wget is a bitch and will not fetch this... sigh
+    # this will copy file to $2... so you may use it as you like
+    elif [ -n "$BASE_URL" -a "${BASE_URL:0:7}" == "file://" ] ; then
+      cp $(echo $BASE_URL | sed 's/file:\/\///') $2
+    elif [ "${1:0:7}" == "file://" ] ; then
+      cp $(echo $1 | sed 's/file:\/\///') $2
+
     else
       # ordinary URL's handled by fuzzy_wget
       connect &&



More information about the Lunar-commits mailing list