Annotation of OpenXM_contrib/gnuplot/commitvers, Revision 1.1.1.1
1.1 maekawa 1: #! /usr/bin/perl
2: #
3: # $Id: commitvers,v 1.4 1996/02/26 22:21:49 drd Exp $
4: #
5: # update version.c and commit gnuplot
6: #
7: # this file will not be in any official release
8: #
9:
10: if( ! -f "version.c" ) {
11: die "Doesn't look like a gnuplot dir to me\n";
12: }
13:
14: rename("version.c",".#version.c") || die "Can't move version.c\n";
15:
16: open(IN, ".#version.c") || die "Can't open version.c.\n";
17: open(OUT, ">version.c") || die "Can't create version.c\n";
18:
19: $major="";
20: $minor="";
21:
22: while(<IN>) {
23: if( /Id: version\.c,v ([0-9]+)\.([0-9]+) / ) {
24: $major=$1;
25: $minor=$2;
26: }
27: if( /^(.*patchlevel.*")(alpha |beta |)[^"]*(".*)$/ ) {
28: die if( $major eq "" || $minor eq "");
29: printf OUT "$1$2%d$3\n", $minor+1;
30: } elsif ( /^(.*date.*")[^"]*(".*)$/ ) {
31: $date=`date`;
32: chop $date;
33: print OUT "$1$date$2\n";
34: } else {
35: print OUT;
36: }
37: }
38:
39: close IN;
40: close OUT;
41:
42: $minor++;
43:
44: print "New version is $major.$minor\n";
45:
46: # check in configure.in first, so that we get the new revision number into
47: # configure
48:
49: if(system("cvs diff configure.in >/dev/null")) {
50: system("cvs commit configure.in");
51: system("autoconf");
52: }
53:
54: system("cvs commit");
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>