Produce correct version string even when not run in a Subversion working copy.

ported from FFmpeg


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18794 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2006-06-23 15:12:56 +00:00
parent 7b0658eb4b
commit eebd69a051
1 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,9 @@
test "$1" && extra="-$1"
svn_revision=`svn info | grep Revision | cut -d' ' -f2 || echo UNKNOWN`
svn_revision=`svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
test $svn_revision || svn_revision=UNKNOWN
NEW_REVISION="#define VERSION \"dev-SVN-r${svn_revision}${extra}\""
OLD_REVISION=`cat version.h 2> /dev/null`