From 461086bbe7af30177ab6f9e1958125c383892a7c Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 26 Apr 2015 17:30:15 -0700 Subject: [PATCH] Handle configure's new version style. --- packaging/nightly-rsync | 4 ++-- packaging/release-rsync | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packaging/nightly-rsync b/packaging/nightly-rsync index 44e85587..6e888bea 100755 --- a/packaging/nightly-rsync +++ b/packaging/nightly-rsync @@ -59,13 +59,13 @@ if ($make_tar) { my $confversion; open(IN, '<', 'configure.ac') or die "Unable to open configure.ac: $!\n"; while () { - 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"; $_ = ; diff --git a/packaging/release-rsync b/packaging/release-rsync index b15aae1f..5f77c2e8 100755 --- a/packaging/release-rsync +++ b/packaging/release-rsync @@ -67,13 +67,13 @@ check_git_state($master_branch, 1, 1); my $confversion; open(IN, '<', 'configure.ac') or die $!; while () { - 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 $!; $_ = ; @@ -202,8 +202,8 @@ foreach my $fn (@tweak_files) { undef $/; $_ = ; $/ = "\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 -- 2.47.2