diff options
author | Wayne Davison <wayned@samba.org> | 2007-09-26 17:43:57 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2007-09-26 17:43:57 +0000 |
commit | 578219bed56bdd6af9bd59497f0954b6d000484c (patch) | |
tree | fd7cd7465aabab9435553bc78d706742884963df /packaging | |
parent | 2e4a3d17b45e168c565a25f694fd73d3079ed8b0 (diff) | |
download | rsync-578219bed56bdd6af9bd59497f0954b6d000484c.tar.gz rsync-578219bed56bdd6af9bd59497f0954b6d000484c.tar.bz2 rsync-578219bed56bdd6af9bd59497f0954b6d000484c.zip |
Determine the previous version number in a more reasonable fashion.
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/release-rsync | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/packaging/release-rsync b/packaging/release-rsync index 9538feac..dc892457 100755 --- a/packaging/release-rsync +++ b/packaging/release-rsync @@ -67,7 +67,7 @@ while (<CVS>) { chdir('rsync') or die $!; my($version, $lastversion); -open(IN, 'configure.in') or die $!; +open(IN, '<', 'configure.in') or die $!; while (<IN>) { if (/^RSYNC_VERSION=(.*)/) { $version = $lastversion = $1; @@ -76,15 +76,11 @@ while (<IN>) { } close IN; -if (my($major, $minor, $rel) = $lastversion =~ /(\d+)\.(\d+)\.(\d+)cvs$/) { - if (--$rel < 0) { - $rel = 9; - if (--$minor < 0) { - $minor = 6; - $major--; - } - } - $lastversion = "$major.$minor.$rel"; +if ($lastversion =~ /cvs$/) { + open(IN, '<', 'OLDNEWS') or die $!; + $_ = <IN>; + close IN; + ($lastversion) = /(\d+\.\d+\.\d+)/; } $version =~ s/cvs/pre1/ || $version =~ s/pre(\d+)/ 'pre' . ($1 + 1) /e; |