summaryrefslogtreecommitdiff
path: root/announce-gen
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-02-22 16:30:28 +0000
committerJim Meyering <jim@meyering.net>2003-02-22 16:30:28 +0000
commit36db69ff1c0cef48fca06dc50d81ec2953807e86 (patch)
tree3c7796bb82f8a3c18d08fbebda2c1151f2c7416b /announce-gen
parent5c69cf2feaeb6d2166cf24f79b7d54ba5e231d65 (diff)
downloadcoreutils-36db69ff1c0cef48fca06dc50d81ec2953807e86.tar.xz
Escape dots in regexps for $curr_version and $prev_version.
Fail if we find no lines in NEWS.
Diffstat (limited to 'announce-gen')
-rwxr-xr-xannounce-gen11
1 files changed, 6 insertions, 5 deletions
diff --git a/announce-gen b/announce-gen
index 5259f9d72..5239949f6 100755
--- a/announce-gen
+++ b/announce-gen
@@ -6,7 +6,7 @@ use Getopt::Long;
use Digest::MD5;
use Digest::SHA1;
-(my $VERSION = '$Revision: 1.5 $ ') =~ tr/[0-9].//cd;
+(my $VERSION = '$Revision: 1.6 $ ') =~ tr/[0-9].//cd;
(my $ME = $0) =~ s|.*/||;
END
@@ -205,21 +205,22 @@ EOF
{
if ( ! $in_items)
{
- # FIXME: quote dots
- $line =~ /^[^ *].*$curr_version/o
+ $line =~ /^[^ *].*\Q$curr_version\E/o
or next;
$in_items = 1;
print $line;
}
else
{
- # FIXME: quote dots
- $line =~ /^[^ *].*$prev_version/o
+ $line =~ /^[^ *].*\Q$prev_version\E/o
and last;
print $line;
}
}
close NEWS;
+
+ $in_items
+ or die "$ME: $news_file: no matching lines\n";
}
# FIXME: depend on whether it's a test release