root/lang/objective-cplusplus/i3/trunk/unix/scripts/ac_init_version.sh @ 38907

Revision 38907, 0.9 kB (checked in by saturday06, 2 years ago)

dgosdfgjsd

  • Property svn:executable set to *
Line 
1# -*- coding: us-ascii-unix -*-
2
3VERSION_H=src/i3/Version.h
4
5if test ! -r $VERSION_H; then
6    echo unknown-version
7    exit
8fi
9
10I3_VERSION_MAJOR=`    grep I3_VERSION_MAJOR     $VERSION_H | cut -d " " -f 3`
11I3_VERSION_MINOR=`    grep I3_VERSION_MINOR     $VERSION_H | cut -d " " -f 3`
12I3_VERSION_EXTENSION=`grep I3_VERSION_EXTENSION $VERSION_H | cut -d " " -f 3`
13
14VERSION="${I3_VERSION_MAJOR}.${I3_VERSION_MINOR}${I3_VERSION_EXTENSION}"
15
16if test "$I3_VERSION_EXTENSION" = ""; then
17    echo $VERSION
18    exit
19fi
20
21REVISION=`LC_ALL=C LANGUAGE=C svn info 2> /dev/null | grep "Last Changed Rev:" | head -n 1 | cut -d ' ' -f 4`
22if test "$REVISION" = ""; then
23    echo $VERSION.unknown-revision
24    exit
25fi
26
27VERSION="${VERSION}.r${REVISION}"
28UPDATES=`LC_ALL=C LANGUAGE=C svn status 2> /dev/null | grep -v "^\?"`
29if test "${UPDATES}" != ""; then
30    VERSION="${VERSION}.modified"
31fi
32
33echo $VERSION
34
Note: See TracBrowser for help on using the browser.