[Ffmpeg-devel] [PATCH]version.sh don't work if svn command unavailable. Rewriting of search in .svn/entries
Nigel Pearson
nigel
Fri Feb 23 00:10:02 CET 2007
On 23/02/2007, at 6:43 AM, Dujardin Bernard wrote:
> When svn is unavailable version.sh fall on this grep search
>
> test $svn_revision || svn_revision=`cd "$1" && grep revision .svn/
> entries | \
> cut -d '"' -f2 2> /dev/null`
As an alternative, MythTV uses svnversion:
version.target = version.cpp
version.commands = sh -c "echo 'const char *myth_source_version =' \
'\"'`(svnversion $${SVNTREEDIR} 2>/dev/null) || echo Unknown`'\";' \
> .vers.new ; diff .vers.new version.cpp > .vers.diff 2>&1 ; \
if test -s .vers.diff ; then mv -f .vers.new version.cpp ; fi ; \
rm -f .vers.new .vers.diff"
version.depends = FORCE
which if you unravel my mess, would be:
svn_revision=`(svnversion $1 2>/dev/null) || echo Unknown`
Note that this lists a compound version number instead of
just a single integer, so the version string might become:
#define FFMPEG_VERSION "SVN-r7654:8019M"
if you a mixture of old and new source.
--
Nigel Pearson, nigel at ind.tansu.com.au|"Reality is that which,
Telstra Net. Eng., Sydney, Australia | when you stop believing
Office: 9202 3900 Fax: 9261 3912 | in it, doesn't go away."
Mobile: 0408 664435 Home: 9792 6998 | Philip K. Dick - 'Valis'
More information about the ffmpeg-devel
mailing list