]> Dogcows Code - chaz/tint2/blob - get_svnrev.sh
desktop name : last step
[chaz/tint2] / get_svnrev.sh
1 #!/bin/sh
2
3 FALLBACK=\"0.11-svn\"
4
5 if [ $# -eq 0 ]; then
6 DIR=.
7 else
8 DIR=$1
9 fi
10
11 if [ -f version.h ]; then
12 REV_OLD=$(cat version.h | cut -d" " -f3)
13 else
14 REV_OLD=\"\"
15 fi
16
17 if [ -x "$(which svnversion 2>/dev/null)" -a -d "${DIR}/.svn" ] ; then
18 REV=\"$(svnversion -n ${DIR})\"
19 else
20 REV=${FALLBACK}
21 fi
22
23 if [ ${REV_OLD} != ${REV} ]; then
24 echo "Building new version.h"
25 echo "Rev_old: ${REV_OLD} Rev: ${REV}"
26 echo "#define VERSION_STRING ${REV}" > version.h
27 fi
This page took 0.037554 seconds and 4 git commands to generate.