You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by br...@apache.org on 2013/10/23 17:09:12 UTC

svn commit: r1535050 - /hive/branches/maven/common/src/scripts/saveVersion.sh

Author: brock
Date: Wed Oct 23 15:09:12 2013
New Revision: 1535050

URL: http://svn.apache.org/r1535050
Log:
HIVE-5616 - fix saveVersion.sh to work on mac (Owen O'Malley via Brock Noland)

Modified:
    hive/branches/maven/common/src/scripts/saveVersion.sh

Modified: hive/branches/maven/common/src/scripts/saveVersion.sh
URL: http://svn.apache.org/viewvc/hive/branches/maven/common/src/scripts/saveVersion.sh?rev=1535050&r1=1535049&r2=1535050&view=diff
==============================================================================
--- hive/branches/maven/common/src/scripts/saveVersion.sh (original)
+++ hive/branches/maven/common/src/scripts/saveVersion.sh Wed Oct 23 15:09:12 2013
@@ -33,7 +33,7 @@ dir=`pwd`
 cwd=`dirname $dir`
 if [ "$revision" = "" ]; then
     if git rev-parse HEAD 2>/dev/null > /dev/null ; then
-        revision=`git log -1 --pretty=format:"%H" ../`
+        revision=`git log -1 --pretty=format:"%H"`
         hostname=`hostname`
         branch=`git branch | sed -n -e 's/^* //p'`
         url="git://${hostname}${cwd}"
@@ -57,7 +57,13 @@ if [ "$url" = "" ]; then
     url="file://$cwd"
 fi
 
-srcChecksum=`find ../ -name '*.java' | grep -v generated-sources | LC_ALL=C sort | xargs md5sum | md5sum | cut -d ' ' -f 1`
+if [ -x /sbin/md5 ]; then
+  md5="/sbin/md5"
+else
+  md5="md5sum"
+fi
+
+srcChecksum=`find ../ -name '*.java' | grep -v generated-sources | LC_ALL=C sort | xargs $md5 | $md5 | cut -d ' ' -f 1`
 
 mkdir -p $src_dir/gen/org/apache/hive/common