source: MondoRescue/branches/2.05/tools/mksvnversion @ 237

Last change on this file since 237 was 237, checked in by bcornec, 15 years ago
  • single place for VERSION numbers in mondo and mindi (Bruno Cornec)
  • revision taken from global tree, not from files for mindi/mondo tagging (Bruno Cornec)
  • chown can't be done for RPMS in install.sh
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 689 bytes
Line 
1#!/bin/bash
2########################################################
3# $Id: mksvnversion 237 2005-12-19 19:23:17Z bcornec $
4########################################################
5#
6# on every build, record the working copy revision string
7#
8dname=`dirname $0`
9prem=`echo $dname |cut -c1`
10if [ ${prem} == "/" ]; then
11    export TOOLHOME=$dname
12else
13    export TOOLHOME=${PWD}/$dname
14fi
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#
21rel=`svnversion $TOOLHOME/..`
22cat > $TOOLHOME/../mondo/revision.h << EOF
23#define REVISION "${rel}"
24EOF
25cat > $TOOLHOME/../mondo/REVISION << EOF
26${rel}
27EOF
28cat > $TOOLHOME/../mindi/REVISION << EOF
29${rel}
30EOF
31
32#
33# return the release
34#
35echo ${rel}
Note: See TracBrowser for help on using the repository browser.