]> Dogcows Code - chaz/tint2/blobdiff - get_svnrev.sh
add missing battery config CPP guard
[chaz/tint2] / get_svnrev.sh
index c6466ab06ab9860a11ad5eeb8a2912b6eb7e5928..06a48cecb6c1a207f54b4e6a629bda3a9ed065d9 100755 (executable)
@@ -1,28 +1,27 @@
-#!/bin/bash
+#!/bin/sh
 
-FALLBACK="0.10-svn"
+FALLBACK=\"0.11-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 "#define VERSION_STRING "${REV}"" > version.h
+  echo "Rev_old: ${REV_OLD} Rev: ${REV}"
+  echo "#define VERSION_STRING ${REV}" > version.h
 fi
-
-
This page took 0.017951 seconds and 4 git commands to generate.