~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to ffmpeg/version.sh

  • Committer: Bazaar Package Importer
  • Author(s): John Dong
  • Date: 2008-02-25 15:47:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080225154712-qvr11ekcea4c9ry8
Tags: 1.1.6-0.1ubuntu1
* Merge from debian-multimedia (LP: #120003), Ubuntu Changes:
 - For ffmpeg-related build-deps, remove cvs from package names.
 - Standards-Version 3.7.3
 - Maintainer Spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
svn_revision=`cd "$1" && LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
 
4
test $svn_revision || svn_revision=`cd "$1" && grep revision .svn/entries | \
 
5
                                    cut -d '"' -f2 2> /dev/null`
 
6
test $svn_revision || svn_revision=UNKNOWN
 
7
 
 
8
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