changeset 23561:007dd9c904d9

Port changes for older Subversion releases from FFmpeg.
author diego
date Tue, 19 Jun 2007 06:51:33 +0000
parents 04d8bd7d7c26
children 5b28053ba249
files version.sh
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/version.sh	Mon Jun 18 21:24:45 2007 +0000
+++ b/version.sh	Tue Jun 19 06:51:33 2007 +0000
@@ -3,8 +3,8 @@
 test "$1" && extra="-$1"
 
 svn_revision=`LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
-test $svn_revision || svn_revision=`grep revision .svn/entries | \
-                                    cut -d '"' -f2 2> /dev/null`
+test $svn_revision || svn_revision=`cd "$1" && grep revision .svn/entries 2>/dev/null | cut -d '"' -f2`
+test $svn_revision || svn_revision=`cd "$1" && sed -n -e '/^dir$/{n;p;q}' .svn/entries 2>/dev/null`
 test $svn_revision || svn_revision=UNKNOWN
 
 NEW_REVISION="#define VERSION \"dev-SVN-r${svn_revision}${extra}\""