[Swift-commit] cog r3796

swift at ci.uchicago.edu swift at ci.uchicago.edu
Sat Sep 21 02:45:03 CDT 2013


------------------------------------------------------------------------
r3796 | hategan | 2013-09-21 02:41:36 -0500 (Sat, 21 Sep 2013) | 1 line

patch from Yadu to fix md5 and wget issues on OS X (bug 1030) (merged 3795 from trunk)
------------------------------------------------------------------------
Index: modules/provider-coaster/resources/bootstrap.sh
===================================================================
--- modules/provider-coaster/resources/bootstrap.sh	(revision 3795)
+++ modules/provider-coaster/resources/bootstrap.sh	(working copy)
@@ -64,14 +64,18 @@
 fi
 detectPaths
 DJ=`mktemp /tmp/bootstrap.XXXXXX`
+UNAME=`uname`
 echo "BS: $BS" >>$L
 WGET=`$WR which wget`
 if [ "X$WGET" == "X" ]; then
 	WGET=`$WR which curl`
 	if [ "X$WGET" == "X" ]; then
-		error "No wget or curl available"
+	    error "No wget or curl available"
+	elif [ "$UNAME" == "Darwin" ]; then
+	    WGET="$WGET -o $DJ $BS/$B.jar >>$L 2>&1"
+	else
+	    WGET="$WGET -O $DJ $BS/$B.jar >>$L 2>&1"  
 	fi
-	WGET="$WGET -O $DJ $BS/$B.jar >>$L 2>&1"
 else
 	WGET="$WGET -c -q $BS/$B.jar -O $DJ >>$L 2>&1"
 fi
@@ -79,12 +83,20 @@
 if [ "$?" != "0" ]; then
 	error "Failed to download bootstrap jar from $BS"
 fi
+
 MD5SUM=`$WR which gmd5sum 2>>$L`
 if [ "X$MD5SUM" == "X" ]; then
-	MD5SUM=`$WR which md5sum 2>>$L`
-	if [ "X$MD5SUM" == "X" ]; then
-		error "No md5sum or gmd5sum found"
-	fi
+    MD5SUM=`$WR which md5sum 2>>$L`
+    if [ "X$MD5SUM" == "X" ]; then
+        MD5SUM=`$WR which md5 2>>$L`
+        if [ "X$MD5SUM" == "X" ]; then
+            error "No md5/md5sum/gmd5sum found"
+        else
+            if [ "$UNAME" == "Darwin" ]; then
+               MD5SUM="$MD5SUM -r"
+            fi
+        fi
+    fi
 fi
 AMD5=`$MD5SUM $DJ`
 AAMD5=`eval echo \$\{AMD5:0:32\}`



More information about the Swift-commit mailing list