source: trunk/version.sh @ 262

Last change on this file since 262 was 262, checked in by titer, 16 years ago

Get revision at build time

  • Property svn:executable set to *
  • Property svn:keywords set to Date Rev Author Id
File size: 420 bytes
Line 
1#! /bin/sh
2#
3# $Id: version.sh 262 2006-05-29 21:58:22Z titer $
4
5REVMAX=0
6
7for pattern in '*.[chm]' '*.cpp' '*.po' 'Makefile*' 'configure' 'version.sh'; do
8  for f in `find . -name "$pattern"`; do 
9    REV=`grep '\$Id:' $f | sed 's/.*\$Id: [^ ]* \([0-9]*\) .*/\1/'`
10    if [ -n "$REV" ]; then
11      if [ "$REV" -gt "$REVMAX" ]; then
12        REVMAX="$REV"
13      fi
14    fi
15  done
16done
17
18rm -f Makefile.version
19echo "SVN_REVISION = $REVMAX" > Makefile.version
20
21exit 0
Note: See TracBrowser for help on using the repository browser.