transmission/version.sh

22 lines
411 B
Bash
Raw Normal View History

2006-05-29 21:58:22 +00:00
#! /bin/sh
#
# $Id$
REVMAX=0
2006-05-29 22:10:03 +00:00
for pattern in '*.[chm]' '*.cpp' '*.po' 'Makefile*' 'configure'; do
2006-05-29 21:58:22 +00:00
for f in `find . -name "$pattern"`; do
REV=`grep '\$Id:' $f | sed 's/.*\$Id: [^ ]* \([0-9]*\) .*/\1/'`
if [ -n "$REV" ]; then
if [ "$REV" -gt "$REVMAX" ]; then
REVMAX="$REV"
fi
fi
done
done
rm -f Makefile.version
echo "VERSION_REVISION = $REVMAX" > Makefile.version
2006-05-29 21:58:22 +00:00
exit 0