Use Subversion revision for FFMPEG_VERSION.
[libav.git] / version.sh
CommitLineData
f1cc88a5
DB
1#!/bin/sh
2
3svn_revision=`svn info | grep Revision | cut -d' ' -f2 || echo UNKNOWN`
4NEW_REVISION="#define FFMPEG_VERSION \"SVN-r$svn_revision\""
5OLD_REVISION=`cat version.h 2> /dev/null`
6
7# Update version.h only on revision changes to avoid spurious rebuilds
8if test "$NEW_REVISION" != "$OLD_REVISION"; then
9 echo "$NEW_REVISION" > version.h
10fi