[Swift-commit] r5690 - trunk/bin
jonmon at ci.uchicago.edu
jonmon at ci.uchicago.edu
Sun Feb 26 16:24:12 CST 2012
Author: jonmon
Date: 2012-02-26 16:24:12 -0600 (Sun, 26 Feb 2012)
New Revision: 5690
Modified:
trunk/bin/swift
Log:
o added check to see if we are running on a mac, if so use md5 and not md5sum
Modified: trunk/bin/swift
===================================================================
--- trunk/bin/swift 2012-02-26 19:31:11 UTC (rev 5689)
+++ trunk/bin/swift 2012-02-26 22:24:12 UTC (rev 5690)
@@ -13,7 +13,7 @@
HEAPMAX=256M
if echo `uname` | grep -i "cygwin"; then
- CYGWIN="yes"
+ CYGWIN="yes"
CPDELIM=";"
fi
@@ -32,7 +32,7 @@
updateOptions() {
if [ "X$1" != "X" ] ; then
- OPTIONS="$OPTIONS -D$2=$1"
+ OPTIONS="$OPTIONS -D$2=$1"
fi
}
@@ -123,10 +123,19 @@
MAC=`$IFCONFIG |grep HWaddr`
fi
-MD5SUM=`which md5sum 2>&1`
-if [ ! -x "$MD5SUM" ]; then
- echo "warning: unable to find md5sum"
- SWIFT_USAGE_STATS=0
+# Check if we are running on a mac, if so look for md5 and not md5sum
+if [ "`uname`" == "Darwin" ]; then
+ MD5SUM=`which md5 2>&1`
+ if [ ! -x "$MD5SUM" ]; then
+ echo "warning: unable to find md5"
+ SWIFT_USAGE_STATS=0
+ fi
+else
+ MD5SUM=`which md5sum 2>&1`
+ if [ ! -x "$MD5SUM" ]; then
+ echo "warning: unable to find md5sum"
+ SWIFT_USAGE_STATS=0
+ fi
fi
BASH="/bin/bash"
More information about the Swift-commit
mailing list