source: MondoRescue/branches/stable/tools/mknewversion@ 1063

Last change on this file since 1063 was 1042, checked in by Bruno Cornec, 17 years ago

Syntax review (== suppresse for stricter POSIX conformance with =)

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/bash
2#
3# Prepare a delivery of a new version by changing VERSION/TAG from stable
4#
5# $Id$
6#
7# Syntax: mknewversion
8#
9
10dname=`dirname $0`
11prem=`echo $dname |cut -c1`
12if [ _${prem} = _"/" ]; then
13 export TOOLHOME=$dname
14else
15 export TOOLHOME=${PWD}/$dname
16fi
17
18# We need to get $VER
19if [ "$1" = "" ]; then
20 echo "Syntax: mknewversion version"
21 exit -1
22else
23 VER=$1
24 shift
25fi
26
27grep -q stable $TOOLHOME/../mondo/VERSION
28if [ $? -ne 0 ]; then
29 echo "A new version can only be made from stable"
30 exit -1
31fi
32
33nb=`svn diff $TOOLHOME/.. | wc -l`
34if [ $nb -gt 0 ]; then
35 echo "You'll have to check in before changing version"
36 exit -1
37fi
38
39echo "Copying the stable version to ${VER}"
40svn copy $SVN_M/branches/stable $SVN_M/branches/${VER} -m "Creation of mondo ${VER} from stable"
41cd $TOOLHOME/../..
42svn co $SVN_M/branches/${VER} ${VER}
43cd ${VER}
44
45for p in mindi mondo mondo-doc mindi-kernel mindi-busybox; do
46 # Reset TAG - This maybe an issue for mindi-busybox only
47 echo "1" > $p/TAG
48 v=$VER
49 echo $p | grep -q mindi
50 if [ $? -eq 0 ]; then
51 echo "Please give new $p version for this $VER mondo version ? "
52 read v
53 fi
54 echo "$v" > $p/VERSION
55done
56svn ci -m "VERSION and TAG update"
57svn up
Note: See TracBrowser for help on using the repository browser.