[darwinbuild-changes] [333] trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Apr 23 13:54:39 PDT 2007


Revision: 333
          http://trac.macosforge.org/projects/darwinbuild/changeset/333
Author:   kvv at apple.com
Date:     2007-04-23 13:54:39 -0700 (Mon, 23 Apr 2007)

Log Message:
-----------
- special case file:/// URLs for downloads

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

Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES	2007-02-14 10:43:52 UTC (rev 332)
+++ trunk/CHANGES	2007-04-23 20:54:39 UTC (rev 333)
@@ -2,6 +2,8 @@
 -----------------------------------
 
 Release x.y.z [Now]
+	- darwinbuild: special case file:/// URLs for downloads
+	- darwintrace: build on Leopard
 	- Added 8G32 plist (Mac OS X 10.4.4 for PowerPC, Darwin 8.4)
 	- darwintrace: build ppc64 library
 	- darwinbuild: add .pbxproj suffix (for xcodebuild)

Modified: trunk/darwinbuild/darwinbuild.common
===================================================================
--- trunk/darwinbuild/darwinbuild.common	2007-02-14 10:43:52 UTC (rev 332)
+++ trunk/darwinbuild/darwinbuild.common	2007-04-23 20:54:39 UTC (rev 333)
@@ -128,12 +128,34 @@
 	do
 		if [ ! -f "$destination/$filename" ]; then
 			mkdir -p "$destination"
-			echo "Attempting to download $master_site/$filename ..."
-			curl $CURLARGS --fail \
-				--silent \
-				--continue-at - \
-				--output "$destination/.tmp.${filename}" \
-				--url "$master_site/$filename"
+			if echo "$master_site" | grep -q "^file://" ; then
+				proj=$(echo "$filename" | sed -e 's,.tar.gz$,,' | sed -e 's,.root$,,')
+				projnam=$(echo "$proj" | sed -e 's,-[0-9.]*$,,')
+				srcdir=$(echo "$master_site/$projnam" | sed -e 's,^file://,,')
+				if [ -d "$srcdir/$proj" ]; then
+					echo "Copying $srcdir/$proj ..."
+					tar czf \
+					    "$destination/.tmp.${filename}" \
+					    -C "$srcdir" \
+					    "$proj"
+				elif [ -d "$srcdir" ]; then
+					echo "Copying $srcdir ..."
+					tar czf \
+					    "$destination/.tmp.${filename}" \
+					    -C "$srcdir" \
+					    .
+				else
+					echo "No such directory: $srcdir"
+					break
+				fi
+			else
+				echo "Downloading $master_site/$filename ..."
+				curl $CURLARGS --fail \
+					--silent \
+					--continue-at - \
+					--output "$destination/.tmp.${filename}" \
+					--url "$master_site/$filename"
+			fi
 			if [ "$?" == "0" ]; then
 				mv "$destination/.tmp.${filename}" "$destination/$filename"
 				echo "Download complete"

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


More information about the darwinbuild-changes mailing list