Latest 9.1 ATI drivers finally fixed PBOs, thus do not need ati-hack and are much
[mplayer/glamo.git] / version.sh
blob2eb66292d26c47f4f3cf20f213eeab37c14c807d
1 #!/bin/sh
3 test "$1" && extra="-$1"
5 svn_revision=`LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
6 test $svn_revision || svn_revision=`grep revision .svn/entries 2>/dev/null | cut -d '"' -f2`
7 test $svn_revision || svn_revision=`sed -n -e '/^dir$/{n;p;q;}' .svn/entries 2>/dev/null`
8 test $svn_revision || svn_revision=UNKNOWN
10 NEW_REVISION="#define VERSION \"SVN-r${svn_revision}${extra}\""
11 OLD_REVISION=`cat version.h 2> /dev/null`
12 TITLE='#define MP_TITLE "%s "VERSION" (C) 2000-2009 MPlayer Team\n"'
14 # Update version.h only on revision changes to avoid spurious rebuilds
15 if test "$NEW_REVISION" != "$OLD_REVISION"; then
16 cat <<EOF > version.h
17 $NEW_REVISION
18 $TITLE
19 EOF