From: Andreas Fink Date: Mon, 14 Jun 2010 13:01:13 +0000 (+0000) Subject: *fix* use [ ] instead of [[ ]] because some systems don't know about [[ ]]??? X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=183c59bd7ad3194e7450c363844242cb39273a72;p=chaz%2Ftint2 *fix* use [ ] instead of [[ ]] because some systems don't know about [[ ]]??? --- diff --git a/get_svnrev.sh b/get_svnrev.sh index 8e6c85e..3dc1e55 100755 --- a/get_svnrev.sh +++ b/get_svnrev.sh @@ -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 - -