Skip to content

Commit

Permalink
Handle configure's new version style.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayne Davison committed May 1, 2015
1 parent 0069461 commit 461086b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packaging/nightly-rsync
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ if ($make_tar) {
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>;
Expand Down
8 changes: 4 additions & 4 deletions packaging/release-rsync
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ check_git_state($master_branch, 1, 1);
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>;
Expand Down Expand Up @@ -202,8 +202,8 @@ foreach my $fn (@tweak_files) {
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
Expand Down

0 comments on commit 461086b

Please sign in to comment.