packages: builder - support lftp for downloading

arekm arekm at pld-linux.org
Sat Oct 22 21:47:36 CEST 2011


Author: arekm                        Date: Sat Oct 22 19:47:36 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- support lftp for downloading

---- Files affected:
packages:
   builder (1.656 -> 1.657) 

---- Diffs:

================================================================
Index: packages/builder
diff -u packages/builder:1.656 packages/builder:1.657
--- packages/builder:1.656	Tue Oct 18 13:32:36 2011
+++ packages/builder	Sat Oct 22 21:47:30 2011
@@ -190,6 +190,15 @@
 	GETURI="axel -a $AXEL_OPTS"
 	GETURI2="$GETURI"
 	OUTFILEOPT="-o"
+elif [ -n "$USE_LFTP" ]; then
+download_lftp() {
+	url="$1"
+	outfile="$2"
+	lftp -c "set net:max-retries $WGET_RETRIES; set http:user-agent \"$USER_AGENT\"; pget -n 10 -c \"$url\" -o \"$outfile.tmp\" && local mv \"$outfile.tmp\" \"$outfile\" || local rm -f \"$outfile.tmp\""
+}
+	GETURI=download_lftp
+	GETURI2=$GETURI
+	OUTFILEOPT=""
 else
 	wget --help 2>&1 | grep -q -- ' --no-check-certificate ' && WGET_OPTS="$WGET_OPTS --no-check-certificate"
 	wget --help 2>&1 | grep -q -- ' --inet ' && WGET_OPTS="$WGET_OPTS --inet"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/builder?r1=1.656&r2=1.657&f=u



More information about the pld-cvs-commit mailing list