view version.sh @ 19706:cf29467223c7

sync of existing (German) xml docs: r19686: Remove the most outdated entries, small updates. r19685: Fix mailing list URLs. r19677: lists.mplayerhq.hu URL fix, comment out mailing list search. r19634: (keyword properties fixed in English version, fixed revision tag in German version of radio.xml) r19609: wording/markup fixes r19607: mention -demuxer lavf in the dvb input section r19589: Fix build after radio commit (here: only install.xml was changed) r19574: Radio support (here: mention radio support in install.xml) r19504: How to handle broken/copy protected VOB files?
author kraymer
date Wed, 06 Sep 2006 11:27:12 +0000
parents 0b07e95ca082
children 601bd947b61d
line wrap: on
line source

#!/bin/sh

test "$1" && extra="-$1"

svn_revision=`LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
test $svn_revision || svn_revision=`cd "$1" && grep revision .svn/entries | \
                                    cut -d '"' -f2 2> /dev/null`
test $svn_revision || svn_revision=UNKNOWN

NEW_REVISION="#define VERSION \"dev-SVN-r${svn_revision}${extra}\""
OLD_REVISION=`cat version.h 2> /dev/null`

# Update version.h only on revision changes to avoid spurious rebuilds
if test "$NEW_REVISION" != "$OLD_REVISION"; then
    echo "$NEW_REVISION" > version.h
fi