1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 00:34:04 +00:00
transmission/version.sh
2006-05-29 21:58:22 +00:00

21 lines
420 B
Bash
Executable file

#! /bin/sh
#
# $Id$
REVMAX=0
for pattern in '*.[chm]' '*.cpp' '*.po' 'Makefile*' 'configure' 'version.sh'; do
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 "SVN_REVISION = $REVMAX" > Makefile.version
exit 0