my $confversion;
open(IN, '<', 'configure.ac') or die "Unable to open configure.ac: $!\n";
while (<IN>) {
- if (/^RSYNC_VERSION=(.*)/) {
+ if (/^AC_INIT\(\[rsync\],\s+\[(\d.+?)\]/) {
$confversion = $1;
last;
}
}
close IN;
- die "Unable to find RSYNC_VERSION in configure.ac\n" unless defined $confversion;
+ die "Unable to find AC_INIT with version in configure.ac\n" unless defined $confversion;
open(IN, '<', 'OLDNEWS') or die "Unable to open OLDNEWS: $!\n";
$_ = <IN>;
my $confversion;
open(IN, '<', 'configure.ac') or die $!;
while (<IN>) {
- if (/^RSYNC_VERSION=(.*)/) {
+ if (/^AC_INIT\(\[rsync\],\s+\[(\d.+?)\]/) {
$confversion = $1;
last;
}
}
close IN;
-die "Unable to find RSYNC_VERSION in configure.ac\n" unless defined $confversion;
+die "Unable to find AC_INIT with version in configure.ac\n" unless defined $confversion;
open(IN, '<', 'OLDNEWS') or die $!;
$_ = <IN>;
undef $/; $_ = <IN>; $/ = "\n";
close IN;
if ($fn =~ /configure/) {
- s/^RSYNC_VERSION=.*/RSYNC_VERSION=$version/m
- or die "Unable to update RSYNC_VERSION in $fn\n";
+ s/^(AC_INIT\(\[rsync\],\s+\[)\d.+?(\])/$1$version$2/m
+ or die "Unable to update AC_INIT with version in $fn\n";
} elsif ($fn =~ /\.spec/) {
while (my($str, $val) = each %specvars) {
s/^\Q$str\E .*/$str $val/m