Last change
on this file since 1744 was
1744,
checked in by joshe, 15 years ago
|
Bump version to 0.7.
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Date Rev Author Id
|
File size:
1.5 KB
|
Line | |
---|
1 | #! /bin/sh |
---|
2 | # |
---|
3 | # $Id: version.sh 1744 2007-04-18 14:06:52Z joshe $ |
---|
4 | |
---|
5 | MAJOR=0 |
---|
6 | MINOR=7 |
---|
7 | MAINT=0 |
---|
8 | STRING=0.70 |
---|
9 | |
---|
10 | # Get current SVN revision from Ids in all source files |
---|
11 | REV=`( find . '(' -name '*.[chm]' -o -name '*.cpp' -o -name '*.po' \ |
---|
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 | |
---|
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 | } |
---|
30 | |
---|
31 | # Generate version.mk |
---|
32 | cat > mk/version.mk.new << EOF |
---|
33 | VERSION_MAJOR = $MAJOR |
---|
34 | VERSION_MINOR = $MINOR |
---|
35 | VERSION_MAINTENANCE = $MAINT |
---|
36 | VERSION_STRING = $STRING |
---|
37 | VERSION_REVISION = $REV |
---|
38 | EOF |
---|
39 | replace_if_differs mk/version.mk.new mk/version.mk |
---|
40 | |
---|
41 | # Generate version.h |
---|
42 | cat > libtransmission/version.h.new << EOF |
---|
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 |
---|
48 | EOF |
---|
49 | replace_if_differs libtransmission/version.h.new libtransmission/version.h |
---|
50 | |
---|
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 | |
---|
56 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.