[darwinbuild-changes] [112] trunk/darwinbuild/darwinbuild.common

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 4 01:47:13 PDT 2006


Revision: 112
          http://trac.macosforge.org/projects/darwinbuild/changeset/112
Author:   kevin
Date:     2006-10-04 01:47:12 -0700 (Wed, 04 Oct 2006)

Log Message:
-----------
- recover from interrupted downloads by downloading to a temporary file

Modified Paths:
--------------
    trunk/darwinbuild/darwinbuild.common

Modified: trunk/darwinbuild/darwinbuild.common
===================================================================
--- trunk/darwinbuild/darwinbuild.common	2005-07-29 00:49:01 UTC (rev 111)
+++ trunk/darwinbuild/darwinbuild.common	2006-10-04 08:47:12 UTC (rev 112)
@@ -90,9 +90,11 @@
 			echo "Attempting to download $master_site/$filename ..."
 			curl --fail \
 				--silent \
-				--output "$destination/$filename" \
+				--continue-at - \
+				--output "$destination/.tmp.${filename}" \
 				--url "$master_site/$filename"
-			if [ -f "$destination/$filename" ]; then
+			if [ "$?" == "0" ]; then
+				mv "$destination/.tmp.${filename}" "$destination/$filename"
 				echo "Download complete"
 				break
 			fi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20061004/b16063ad/attachment.html


More information about the darwinbuild-changes mailing list