2001-04-14 22:26:27 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2006-06-20 10:08:19 +00:00
|
|
|
test "$1" && extra="-$1"
|
2006-06-06 12:01:34 +00:00
|
|
|
|
2006-07-29 23:30:55 +00:00
|
|
|
svn_revision=`LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
|
2006-09-24 15:53:23 +00:00
|
|
|
test $svn_revision || svn_revision=`grep revision .svn/entries | \
|
2006-09-05 23:19:22 +00:00
|
|
|
cut -d '"' -f2 2> /dev/null`
|
2006-06-23 15:12:56 +00:00
|
|
|
test $svn_revision || svn_revision=UNKNOWN
|
|
|
|
|
2006-06-22 13:47:50 +00:00
|
|
|
NEW_REVISION="#define VERSION \"dev-SVN-r${svn_revision}${extra}\""
|
|
|
|
OLD_REVISION=`cat version.h 2> /dev/null`
|
2006-12-28 15:31:48 +00:00
|
|
|
TITLE="#define MP_TITLE \"MPlayer dev-SVN-r${svn_revision}${extra} (C) 2000-2006 MPlayer Team\""
|
2006-06-22 13:47:50 +00:00
|
|
|
|
|
|
|
# Update version.h only on revision changes to avoid spurious rebuilds
|
|
|
|
if test "$NEW_REVISION" != "$OLD_REVISION"; then
|
|
|
|
echo "$NEW_REVISION" > version.h
|
2006-12-28 15:31:48 +00:00
|
|
|
echo "$TITLE" >> version.h
|
2006-06-22 13:47:50 +00:00
|
|
|
fi
|