Changed code that used pts=0 in demux packets to indicate "not known".
[mplayer.git] / version.sh
blob1c6d95a3b394f2303207d0370d76ccbae56c9ed4
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 | \
7 cut -d '"' -f2 2> /dev/null`
8 test $svn_revision || svn_revision=UNKNOWN
10 NEW_REVISION="#define VERSION \"dev-SVN-r${svn_revision}${extra}\""
11 OLD_REVISION=`cat version.h 2> /dev/null`
13 # Update version.h only on revision changes to avoid spurious rebuilds
14 if test "$NEW_REVISION" != "$OLD_REVISION"; then
15 echo "$NEW_REVISION" > version.h