mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
Tweaked version.sh (much faster on BeOS)
This commit is contained in:
parent
fb2d39c3d2
commit
4b1c435ee3
1 changed files with 9 additions and 14 deletions
21
version.sh
21
version.sh
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue