Fixed for Solaris sh
authorAlex Kirhenshtein <alk@netxms.org>
Mon, 14 Dec 2015 22:43:06 +0000 (00:43 +0200)
committerAlex Kirhenshtein <alk@netxms.org>
Mon, 14 Dec 2015 22:43:06 +0000 (00:43 +0200)
tools/updatetag.sh

index e998ef1..2797956 100755 (executable)
@@ -6,7 +6,8 @@ HEADER="netxms-build-tag.h"
 
 BUILD_TAG=`git describe 2>/dev/null`
 [ -z $BUILD_TAG ] && BUILD_TAG=UNKNOWN
-if ! grep -q "BUILDTAG:$BUILD_TAG" $HEADER; then
+grep "BUILDTAG:$BUILD_TAG" $HEADER >/dev/null 2>&1
+if [ $? != 0 ]; then
   echo "/* BUILDTAG:$BUILD_TAG */" > $HEADER
   echo "#ifndef _build_tag_h_" >> $HEADER
   echo "#define _build_tag_h_" >> $HEADER