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

Last change on this file since 1937 was 1937, checked in by piso, 20 years ago

Initial checkin.

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/sh
2
3# $Id: update-version,v 1.1 2003-05-24 17:00:18 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.in > /dev/null ||
28    { echo "Error: current version of configure.in 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.in
40p4 edit configure
41sed -e "s/$1/$2/g" configure.in > configure.in.new
42mv configure.in configure.in~
43mv configure.in.new configure.in
44cvs commit -m "$2" configure.in ||
45{ echo "Error: unable to commit configure.in"; 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.