source: branches/1.4x/macosx/version.sh @ 7096

Last change on this file since 7096 was 7096, checked in by charles, 13 years ago

(1.4x) set the peer-id and User-Agent to show the 1.40 stable release

  • Property svn:executable set to *
  • Property svn:keywords set to Date Rev Author Id
File size: 1.3 KB
Line 
1#! /bin/sh
2#
3# $Id: version.sh 7096 2008-11-10 15:30:42Z charles $
4
5# convention: -TR MAJOR MINOR MAINT STATUS - (each a single char)
6# STATUS: "X" for prerelease test builds,
7#         "Z" for unsupported trunk builds,
8#         "0" for stable, supported releases
9# these should be the only two lines you need to change
10PEERID_PREFIX="-TR1400-"
11USERAGENT_PREFIX="1.40"
12
13SVN_REVISION=`find ./macosx ./libtransmission -name "*\.[chmp]" -o -name "*\.cpp" -o -name "*\.po" -o -name "*\.sh" | \
14              xargs grep "\$Id:" | \
15              grep -v third-party | \
16              cut -d"$Id:" -f3 | cut -d" " -f3 | sort -n | tail -n 1`
17 
18# Generate files to be included: only overwrite them if changed so make
19# won't rebuild everything unless necessary
20replace_if_differs ()
21{
22    if cmp $1 $2 > /dev/null 2>&1; then
23      rm -f $1
24    else
25      mv -f $1 $2
26    fi
27}
28
29# Generate version.h
30cat > libtransmission/version.h.new << EOF
31#define PEERID_PREFIX             "$PEERID_PREFIX"
32#define USERAGENT_PREFIX          "$USERAGENT_PREFIX"
33#define SVN_REVISION              "$SVN_REVISION"
34#define SHORT_VERSION_STRING      "$USERAGENT_PREFIX"
35#define LONG_VERSION_STRING       "$USERAGENT_PREFIX ($SVN_REVISION)"
36
37#define VERSION_STRING_INFOPLIST  $USERAGENT_PREFIX
38#define BUNDLE_VERSION_INFOPLIST  $SVN_REVISION
39EOF
40replace_if_differs libtransmission/version.h.new libtransmission/version.h
41
42exit 0
Note: See TracBrowser for help on using the repository browser.