Changeset 1075 for trunk/version.sh


Ignore:
Timestamp:
Nov 11, 2006, 2:02:44 AM (16 years ago)
Author:
titer
Message:

Clean up, generate Info.plist from version.sh as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/version.sh

    r1036 r1075  
    33# $Id$
    44
     5MAJOR=0
     6MINOR=6
     7STRING=0.7-svn
     8
    59# Get current SVN revision from Ids in all source files
    6 REVMAX=`( find . '(' -name '*.[chm]' -o -name '*.cpp' -o -name '*.po' \
     10REV=`( find . '(' -name '*.[chm]' -o -name '*.cpp' -o -name '*.po' \
    711            -o -name '*.mk' -o -name '*.in' -o -name 'Makefile' \
    812            -o -name 'configure' ')' -exec cat '{}' ';' ) | \
     
    2529
    2630# Generate version.mk
    27 cp -f mk/version.mk.in mk/version.mk.new
    28 echo "VERSION_REVISION = $REVMAX" >> mk/version.mk.new
     31cat > mk/version.mk.new << EOF
     32VERSION_MAJOR    = $MAJOR
     33VERSION_MINOR    = $MINOR
     34VERSION_STRING   = $STRING
     35VERSION_REVISION = $REV
     36EOF
    2937replace_if_differs mk/version.mk.new mk/version.mk
    3038
    31 # Generate version.h from version.mk
    32 grep "^VER" mk/version.mk | sed -e 's/^/#define /g' -e 's/= //g' \
    33     -e 's/\(VERSION_STRING[ ]*\)\(.*\)/\1"\2"/' > \
    34     libtransmission/version.h.new
     39# Generate version.h
     40cat > libtransmission/version.h.new << EOF
     41#define VERSION_MAJOR    $MAJOR
     42#define VERSION_MINOR    $MINOR
     43#define VERSION_STRING   "$STRING"
     44#define VERSION_REVISION $REV
     45EOF
    3546replace_if_differs libtransmission/version.h.new libtransmission/version.h
    3647
     48# Generate Info.plist from Info.plist.in
     49sed -e "s/%%BUNDLE_VERSION%%/$REV/" -e "s/%%SHORT_VERSION_STRING%%/$STRING/" \
     50        < macosx/Info.plist.in > macosx/Info.plist.new
     51replace_if_differs macosx/Info.plist.new macosx/Info.plist
     52
    3753exit 0
Note: See TracChangeset for help on using the changeset viewer.