comparison version.sh @ 23561:007dd9c904d9

Port changes for older Subversion releases from FFmpeg.
author diego
date Tue, 19 Jun 2007 06:51:33 +0000
parents 8ec12f1f0bd5
children f5edea48bb66
comparison
equal deleted inserted replaced
23560:04d8bd7d7c26 23561:007dd9c904d9
1 #!/bin/sh 1 #!/bin/sh
2 2
3 test "$1" && extra="-$1" 3 test "$1" && extra="-$1"
4 4
5 svn_revision=`LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2` 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 | \ 6 test $svn_revision || svn_revision=`cd "$1" && grep revision .svn/entries 2>/dev/null | cut -d '"' -f2`
7 cut -d '"' -f2 2> /dev/null` 7 test $svn_revision || svn_revision=`cd "$1" && sed -n -e '/^dir$/{n;p;q}' .svn/entries 2>/dev/null`
8 test $svn_revision || svn_revision=UNKNOWN 8 test $svn_revision || svn_revision=UNKNOWN
9 9
10 NEW_REVISION="#define VERSION \"dev-SVN-r${svn_revision}${extra}\"" 10 NEW_REVISION="#define VERSION \"dev-SVN-r${svn_revision}${extra}\""
11 OLD_REVISION=`cat version.h 2> /dev/null` 11 OLD_REVISION=`cat version.h 2> /dev/null`
12 TITLE="#define MP_TITLE \"MPlayer dev-SVN-r${svn_revision}${extra} (C) 2000-2007 MPlayer Team\"" 12 TITLE="#define MP_TITLE \"MPlayer dev-SVN-r${svn_revision}${extra} (C) 2000-2007 MPlayer Team\""