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

Auke Kok sofar at lunar-linux.org
Thu Apr 7 09:19:59 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:
API change: separately pass the filename argument when downloading and verifying files (url, filename, target dir)


Index: download.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/download.lunar,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- download.lunar	6 Apr 2005 07:44:42 -0000	1.59
+++ download.lunar	7 Apr 2005 09:19:57 -0000	1.60
@@ -37,7 +37,7 @@
 	debug_msg "download_url($@)"
 	verbose_msg "trying to download \"$URL\""
 	connect &&
-	plugin_call SOURCE_DOWNLOAD $1 $2
+	plugin_call SOURCE_DOWNLOAD $1 $2 $3
 	RETVAL=$?
 	if [ $RETVAL == 2 ]; then
 		message "${PROBLEM_COLOR}Warning:${QUERY_COLOR} I don't know how to download \"$1\"${DEFAULT_COLOR}"
@@ -86,7 +86,7 @@
 			fi
 		}
 
-		if plugin_call SOURCE_NEEDREFRESH ${URLS[0]} $SOURCE_CACHE/$SRC || [ ! -f $SOURCE_CACHE/$SRC ] ; then
+		if plugin_call SOURCE_NEEDREFRESH ${URLS[0]} $SRC $SOURCE_CACHE || [ ! -f $SOURCE_CACHE/$SRC ] ; then
 			# check for cache?
 			message "${MESSAGE_COLOR}Downloading source file" \
 				"${FILE_COLOR}$SRC${DEFAULT_COLOR}" \
@@ -116,13 +116,13 @@
 			add_url $LRESORT_URL
 		
 			for URL in $ALL_URLS; do
-				# add source part if needed
+				# add trailing '/'
 				if [ "${URL:((${#URL}-1)):1}" == "/" ] ; then
-					URL=${URL}${SRC}
+					URL="${URL}/"
 				fi
 
 				# and download
-				if download_url $URL $SOURCE_CACHE/$SRC ; then
+				if download_url $URL $SRC $SOURCE_CACHE ; then
 					break
 				fi
 			done



More information about the Lunar-commits mailing list