#!/usr/bin/perl -- # --*-Perl-*--
use strict;
+use Getopt::Std;
+use vars qw($opt_v);
select STDOUT; $| = 1;
+my $usage = "Usage: $0 [-v version]\n";
+
+die $usage if ! getopts('v:');
+my $version = $opt_v || undef;
+
my @cvsbad = `cvs -n update 2>&1 | grep -v ^cvs`;
if (@cvsbad) {
print STDERR @cvsbad;
$minor++;
-print "About to release $major.$minor; are you sure? ";
+$version = "$major.$minor" if !$version;
+
+print "About to release $version; are you sure? ";
chop($_ = scalar(<>));
die "Aborted!\n" if !/^y/i;
open (F, ">VERSION");
-print F "$pre$major.$minor$post";
+print F "$pre$version$post";
close (F);
-system ("cvs commit -m \"Version $major.$minor released.\" VERSION");
-system ("cvs tag V$major$minor");
+system ("cvs commit -m \"Version $version released.\" VERSION");
+$version =~ s/\.//g;
+system ("cvs tag V$version");