]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- support lftp for downloading
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 22 Oct 2011 19:47:30 +0000 (19:47 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    builder.sh -> 1.657

builder.sh

index bb08a3d9dfc7af6f43bd2be23a3fb413b8203bf8..584e482c357e432e5a2cd05fd1e80542ce610ef5 100644 (file)
@@ -190,6 +190,15 @@ elif [ -n "$USE_AXEL" ]; then
        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"
This page took 0.239732 seconds and 4 git commands to generate.