Last change
on this file since 2067 was 36, checked in by bcornec, 19 years ago |
SPEC tagging done during rpm build not on the master
|
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Id
|
File size:
656 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | ########################################################
|
---|
3 | # $Id: mksvnversion 36 2005-09-29 01:20:10Z bcornec $
|
---|
4 | ########################################################
|
---|
5 | #
|
---|
6 | # on every build, record the working copy revision string
|
---|
7 | #
|
---|
8 | dname=`dirname $0`
|
---|
9 | prem=`echo $dname |cut -c1`
|
---|
10 | if [ ${prem} == "/" ]; then
|
---|
11 | export TOOLHOME=$dname
|
---|
12 | else
|
---|
13 | export TOOLHOME=${PWD}/$dname
|
---|
14 | fi
|
---|
15 | . $TOOLHOME/rpm-env
|
---|
16 |
|
---|
17 | #
|
---|
18 | # Create a .c file for mondo to link with and get
|
---|
19 | # the right build version from SVN
|
---|
20 | #
|
---|
21 | rel=`svnversion $TOOLHOME/..`
|
---|
22 | cat > $TOOLHOME/../mondo/svn_version.c << EOF
|
---|
23 | const char* svn_version(void) {
|
---|
24 | const char* SVN_Version = "${rel}";
|
---|
25 | return SVN_Version;
|
---|
26 | }"
|
---|
27 | EOF
|
---|
28 |
|
---|
29 | #
|
---|
30 | # return the release
|
---|
31 | #
|
---|
32 | echo ${rel}
|
---|
Note:
See
TracBrowser
for help on using the repository browser.