(THRIFT-40) Fix compilation and version string on OS X.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672943 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/print_version.sh b/print_version.sh
index 92d1a2d..cb74201 100755
--- a/print_version.sh
+++ b/print_version.sh
@@ -12,7 +12,7 @@
elif test -d .git ; then
SHA1=`git rev-list --max-count=1 --grep='^git-svn-id:' HEAD`
REVISION=`git cat-file commit $SHA1 | sed -ne 's/^git-svn-id:[^@]*@\([0-9][0-9]*\).*/r\1/p'`
- OFFSET=`git rev-list ^$SHA1 HEAD | wc -l`
+ OFFSET=`git rev-list ^$SHA1 HEAD | wc -l | tr -d ' '`
if test $OFFSET != 0 ; then
REVISION="$REVISION-$OFFSET-`git rev-parse --verify HEAD | cut -c 1-7`"
fi