Author: arekm                        Date: Sun Oct 23 10:34:08 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- move tmpfile handling outside of lftp

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

---- Diffs:

================================================================
Index: packages/builder
diff -u packages/builder:1.657 packages/builder:1.658
--- packages/builder:1.657      Sat Oct 22 21:47:30 2011
+++ packages/builder    Sun Oct 23 12:34:03 2011
@@ -192,9 +192,15 @@
        OUTFILEOPT="-o"
 elif [ -n "$USE_LFTP" ]; then
 download_lftp() {
+       local url outfile retval
        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\""
+       lftp -c "set net:max-retries $WGET_RETRIES; set http:user-agent 
\"$USER_AGENT\"; pget -n 10 -c \"$url\" -o \"$outfile.tmp\""
+       if [ $? -eq 0 ]; then
+               mv -f "$outfile.tmp" "$outfile"
+       else
+               rm -f "$outfile.tmp"
+       fi
 }
        GETURI=download_lftp
        GETURI2=$GETURI
================================================================

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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to