1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 16:52:39 +00:00

Tweaked version.sh (much faster on BeOS)

This commit is contained in:
Eric Petit 2006-10-28 16:51:28 +00:00
parent fb2d39c3d2
commit 4b1c435ee3

View file

@ -3,19 +3,14 @@
# $Id$
# Get current SVN revision from Ids in all source files
REVMAX=0
for pattern in '*.[chm]' '*.cpp' '*.po' '*.mk' '*.in' 'Makefile' 'configure'; do
for f in `find . -name "$pattern"`; do
REV=`sed -e '/\$Id:/!d' -e \
's/.*\$Id: [^ ]* \([0-9]*\) .*/\1/' \
$f`
if [ -n "$REV" ]; then
if [ "$REV" -gt "$REVMAX" ]; then
REVMAX="$REV"
fi
fi
done
done
REVMAX=`( find . '(' -name '*.[chm]' -o -name '*.cpp' -o -name '*.po' \
-o -name '*.mk' -o -name '*.in' -o -name 'Makefile' \
-o -name 'configure' ')' -exec cat '{}' ';' ) | \
sed -e '/\$Id:/!d' -e \
's/.*\$Id: [^ ]* \([0-9]*\) .*/\1/' |
awk 'BEGIN { REV=0 }
// { if ( $1 > REV ) REV=$1 }
END { print REV }'`
# Generate files to be included: only overwrite them if changed so make
# won't rebuild everything unless necessary