Fixed Solaris build
authorVictor Kirhenshtein <victor@netxms.org>
Mon, 14 Dec 2015 14:35:25 +0000 (16:35 +0200)
committerVictor Kirhenshtein <victor@netxms.org>
Mon, 14 Dec 2015 14:35:25 +0000 (16:35 +0200)
tools/updatetag.sh

index b391102..fc294d2 100755 (executable)
@@ -3,10 +3,10 @@
 HEADER="netxms-build-tag.h"
 
 git describe >/dev/null 2>/dev/null
-if [ $? -eq 0 ]; then
+if test $? -eq 0; then
        echo "Checking build tag"
        BUILD_TAG=`git describe`
-       if [ -e $HEADER ]; then
+       if test -f $HEADER; then
                found=`cat $HEADER | grep "BUILDTAG:$BUILD_TAG" | wc -l`
                if [ $found -gt 0 ]; then
                        update="no"
@@ -16,7 +16,7 @@ if [ $? -eq 0 ]; then
        else
                update="yes"
        fi
-       if [ "$update" = "yes" ]; then
+       if test "x$update" = "xyes"; then
                echo "/* BUILDTAG:$BUILD_TAG */" > $HEADER
                echo "#ifndef _build_tag_h_" >> $HEADER
                echo "#define _build_tag_h_" >> $HEADER