]> Dogcows Code - chaz/tint2/commitdiff
*fix* use [ ] instead of [[ ]] because some systems don't know about [[ ]]???
authorAndreas Fink <andreas.fink85@googlemail.com>
Mon, 14 Jun 2010 13:01:13 +0000 (13:01 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Mon, 14 Jun 2010 13:01:13 +0000 (13:01 +0000)
get_svnrev.sh

index 8e6c85e3763844812f3b0129d6a798dfc503226a..3dc1e55c6e749a37dbecfa88a43b510c863ac0b2 100755 (executable)
@@ -2,27 +2,26 @@
 
 FALLBACK=\"0.10-svn\"
 
-if [[ $# -eq 0 ]]; then
+if [ $# -eq 0 ]; then
   DIR=.
 else
   DIR=$1
 fi
 
-if [[ -f version.h ]]; then
+if [ -f version.h ]; then
   REV_OLD=$(cat version.h  | cut -d" " -f3)
 else
-  REV_OLD=""
+  REV_OLD=\"\"
 fi
 
-if [[ -x "$(which svnversion 2>/dev/null)" && -d "${DIR}/.svn" ]] ; then
+if [ -x "$(which svnversion 2>/dev/null)" -a -d "${DIR}/.svn" ] ; then
   REV=\"$(svnversion -n ${DIR})\"
 else
   REV=${FALLBACK}
 fi
 
-if [[ ${REV_OLD} != ${REV} ]]; then
+if [ ${REV_OLD} != ${REV} ]; then
   echo "Building new version.h"
+  echo "Rev_old: ${REV_OLD} Rev: ${REV}"
   echo "#define VERSION_STRING ${REV}" > version.h
 fi
-
-
This page took 0.026525 seconds and 4 git commands to generate.