source: trunk/j/scripts/update-version @ 4507

Last change on this file since 4507 was 4507, checked in by piso, 18 years ago

configure.in => configure.ac

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/sh
2
3# $Id: update-version,v 1.2 2003-10-23 01:00:43 piso Exp $
4
5# Usage: update-version old-version new-version
6
7if [[ -z $1 || -z $2 ]]; then
8    echo "Usage: update-version old-version new-version"; exit 1;
9fi
10
11echo Old version is $1
12echo New version is $2
13
14if [ -f Version.java ]; then
15    grep $1 Version.java > /dev/null ||
16        { echo "Error: current version of Version.java is not $1"; exit 1; }
17    p4 edit Version.java
18    sed -e "s/$1/$2/g" Version.java > Version.java.new
19    mv Version.java Version.java~
20    mv Version.java.new Version.java
21    cvs commit -m "$2" Version.java
22    exit 0;
23fi
24
25grep $1 build.xml > /dev/null ||
26    { echo "Error: current version of build.xml is not $1"; exit 1; }
27grep $1 configure.ac > /dev/null ||
28    { echo "Error: current version of configure.ac is not $1"; exit 1; }
29grep $1 configure > /dev/null ||
30    { echo "Error: current version of configure is not $1"; exit 1; }
31
32p4 edit build.xml
33sed -e "s/$1/$2/g" build.xml > build.xml.new
34mv build.xml build.xml~
35mv build.xml.new build.xml
36cvs commit -m "$2" build.xml ||
37{ echo "Error: unable to commit build.xml"; exit 1; }
38
39p4 edit configure.ac
40p4 edit configure
41sed -e "s/$1/$2/g" configure.ac > configure.ac.new
42mv configure.ac configure.ac~
43mv configure.ac.new configure.ac
44cvs commit -m "$2" configure.ac ||
45{ echo "Error: unable to commit configure.ac"; exit 1; }
46mv configure configure~
47autoconf
48cvs commit -m "$2" configure ||
49{ echo "Error: unable to commit configure"; exit 1; }
50
51# Note that the files are left open for edit in Perforce at this point.
52
53exit 0;
Note: See TracBrowser for help on using the repository browser.