Statistics
| Branch: | Revision:

ffmpeg / version.sh @ 6b8bcd3e

History | View | Annotate | Download (612 Bytes)

1 f1cc88a5 Diego Biurrun
#!/bin/sh
2
3 59d0fc57 Diego Biurrun
svn_revision=`cd "$1" && LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
4 7a68f7fa Måns Rullgård
test $svn_revision || svn_revision=`cd "$1" && grep revision .svn/entries 2>/dev/null | cut -d '"' -f2`
5
test $svn_revision || svn_revision=`cd "$1" && sed -n -e '/^dir$/{n;p;q}' .svn/entries 2>/dev/null`
6 a66d63a9 Diego Biurrun
test $svn_revision || svn_revision=UNKNOWN
7
8 f1cc88a5 Diego Biurrun
NEW_REVISION="#define FFMPEG_VERSION \"SVN-r$svn_revision\""
9
OLD_REVISION=`cat version.h 2> /dev/null`
10
11
# Update version.h only on revision changes to avoid spurious rebuilds
12
if test "$NEW_REVISION" != "$OLD_REVISION"; then
13
    echo "$NEW_REVISION" > version.h
14
fi