[llvm-commits] [test-suite] r111460 - /test-suite/trunk/HashProgramOutput.sh
Daniel Dunbar
daniel at zuster.org
Wed Aug 18 16:43:47 PDT 2010
Author: ddunbar
Date: Wed Aug 18 18:43:47 2010
New Revision: 111460
URL: http://llvm.org/viewvc/llvm-project?rev=111460&view=rev
Log:
HashProgramOutput: Filter md5sum output to match expected format.
Modified:
test-suite/trunk/HashProgramOutput.sh
Modified: test-suite/trunk/HashProgramOutput.sh
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/HashProgramOutput.sh?rev=111460&r1=111459&r2=111460&view=diff
==============================================================================
--- test-suite/trunk/HashProgramOutput.sh (original)
+++ test-suite/trunk/HashProgramOutput.sh Wed Aug 18 18:43:47 2010
@@ -6,8 +6,10 @@
fi
md5cmd=$(which md5sum)
+is_md5sum=1
if [ ! -x "$md5cmd" ]; then
md5cmd=$(which md5)
+ is_md5sum=0
if [ ! -x "$md5cmd" ]; then
echo "error: unable to find either 'md5sum' or 'md5'"
exit 1
@@ -15,5 +17,9 @@
fi
mv $1 $1.bak
-$md5cmd < $1.bak > $1
+if [ $is_md5sum = "0" ]; then
+ $md5cmd < $1.bak > $1
+else
+ $md5cmd < $1.bak | cut -d' ' -f 1 > $1
+fi
rm -f $1.bak
More information about the llvm-commits
mailing list