Last change
on this file since 1798 was
1798,
checked in by livings124, 15 years ago
|
update trunk version to 0.71
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Date Rev Author Id
|
File size:
1.5 KB
|
Rev | Line | |
---|
[262] | 1 | #! /bin/sh |
---|
| 2 | # |
---|
| 3 | # $Id: version.sh 1798 2007-04-23 23:36:10Z livings124 $ |
---|
| 4 | |
---|
[1075] | 5 | MAJOR=0 |
---|
[1744] | 6 | MINOR=7 |
---|
[1798] | 7 | MAINT=1 |
---|
[1749] | 8 | STRING=0.80-svn |
---|
[1661] | 9 | |
---|
[265] | 10 | # Get current SVN revision from Ids in all source files |
---|
[1075] | 11 | REV=`( find . '(' -name '*.[chm]' -o -name '*.cpp' -o -name '*.po' \ |
---|
[1036] | 12 | -o -name '*.mk' -o -name '*.in' -o -name 'Makefile' \ |
---|
| 13 | -o -name 'configure' ')' -exec cat '{}' ';' ) | \ |
---|
| 14 | sed -e '/\$Id:/!d' -e \ |
---|
| 15 | 's/.*\$Id: [^ ]* \([0-9]*\) .*/\1/' | |
---|
| 16 | awk 'BEGIN { REV=0 } |
---|
| 17 | // { if ( $1 > REV ) REV=$1 } |
---|
| 18 | END { print REV }'` |
---|
| 19 | |
---|
[265] | 20 | # Generate files to be included: only overwrite them if changed so make |
---|
| 21 | # won't rebuild everything unless necessary |
---|
| 22 | replace_if_differs () |
---|
| 23 | { |
---|
| 24 | if cmp $1 $2 > /dev/null 2>&1; then |
---|
| 25 | rm -f $1 |
---|
| 26 | else |
---|
| 27 | mv -f $1 $2 |
---|
| 28 | fi |
---|
| 29 | } |
---|
[262] | 30 | |
---|
[265] | 31 | # Generate version.mk |
---|
[1075] | 32 | cat > mk/version.mk.new << EOF |
---|
[1661] | 33 | VERSION_MAJOR = $MAJOR |
---|
| 34 | VERSION_MINOR = $MINOR |
---|
| 35 | VERSION_MAINTENANCE = $MAINT |
---|
| 36 | VERSION_STRING = $STRING |
---|
| 37 | VERSION_REVISION = $REV |
---|
[1075] | 38 | EOF |
---|
[265] | 39 | replace_if_differs mk/version.mk.new mk/version.mk |
---|
| 40 | |
---|
[1075] | 41 | # Generate version.h |
---|
| 42 | cat > libtransmission/version.h.new << EOF |
---|
[1661] | 43 | #define VERSION_MAJOR $MAJOR |
---|
| 44 | #define VERSION_MINOR $MINOR |
---|
| 45 | #define VERSION_MAINTENANCE $MAINT |
---|
| 46 | #define VERSION_STRING "$STRING" |
---|
| 47 | #define VERSION_REVISION $REV |
---|
[1075] | 48 | EOF |
---|
[265] | 49 | replace_if_differs libtransmission/version.h.new libtransmission/version.h |
---|
| 50 | |
---|
[1075] | 51 | # Generate Info.plist from Info.plist.in |
---|
| 52 | sed -e "s/%%BUNDLE_VERSION%%/$REV/" -e "s/%%SHORT_VERSION_STRING%%/$STRING/" \ |
---|
| 53 | < macosx/Info.plist.in > macosx/Info.plist.new |
---|
| 54 | replace_if_differs macosx/Info.plist.new macosx/Info.plist |
---|
| 55 | |
---|
[262] | 56 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.