2
echo "#define VERSION \"1.0rc2-$1\"" > version.h
3
echo "#define MP_TITLE \"MPlayer 1.0rc2-$1 (C) 2000-2007 MPlayer Team\"" >> version.h
3
test "$1" && extra="-$1"
5
# Extract revision number from file used by daily tarball snapshots
6
# or from the places different Subversion versions have it.
7
svn_revision=$(cat snapshot_version 2> /dev/null)
8
test $svn_revision || svn_revision=$(LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2)
9
test $svn_revision || svn_revision=$(grep revision .svn/entries 2>/dev/null | cut -d '"' -f2)
10
test $svn_revision || svn_revision=$(sed -n -e '/^dir$/{n;p;q;}' .svn/entries 2>/dev/null)
11
test $svn_revision || svn_revision=UNKNOWN
13
NEW_REVISION="#define VERSION \"SVN-r${svn_revision}${extra}\""
14
OLD_REVISION=$(cat version.h 2> /dev/null)
15
TITLE='#define MP_TITLE "%s "VERSION" (C) 2000-2009 MPlayer Team\n"'
17
# Update version.h only on revision changes to avoid spurious rebuilds
18
if test "$NEW_REVISION" != "$OLD_REVISION"; then