summaryrefslogtreecommitdiff
path: root/announce-gen
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-03-20 17:43:12 +0000
committerJim Meyering <jim@meyering.net>2003-03-20 17:43:12 +0000
commit780ccddf5cb6e3d1e4dfb94a74a03919b877d7ea (patch)
treee2ebbf1a6cf8a3fb85b63a618f5944aaf3aad44e /announce-gen
parent9f4a05492384a91c83a8716f12ba4f2dd937f9bd (diff)
downloadcoreutils-780ccddf5cb6e3d1e4dfb94a74a03919b877d7ea.tar.xz
(print_changelog_deltas): Ensure that a newline precedes each row of `*'s.
Diffstat (limited to 'announce-gen')
-rwxr-xr-xannounce-gen8
1 files changed, 6 insertions, 2 deletions
diff --git a/announce-gen b/announce-gen
index 834d33a66..b63585bdf 100755
--- a/announce-gen
+++ b/announce-gen
@@ -6,7 +6,7 @@ use Getopt::Long;
use Digest::MD5;
use Digest::SHA1;
-(my $VERSION = '$Revision: 1.12 $ ') =~ tr/[0-9].//cd;
+(my $VERSION = '$Revision: 1.13 $ ') =~ tr/[0-9].//cd;
(my $ME = $0) =~ s|.*/||;
my %valid_release_types = map {$_ => 1} qw (alpha beta major);
@@ -117,7 +117,7 @@ sub print_changelog_deltas ($$)
# Remove leading `./'.
@reordered = map { s!^\./!!; $_ } @reordered;
- print "ChangeLog entries:\n\n";
+ print "\nChangeLog entries:\n\n";
# print join ("\n", @reordered), "\n";
$prev_version =~ s/\./_/g;
@@ -131,6 +131,7 @@ sub print_changelog_deltas ($$)
# +++ ChangeLog 22 Feb 2003 16:52:51 -0000 1.247
# and those starting with `+'.
# Don't print the others.
+ my $prev_printed_line_empty = 1;
while (defined (my $line = <DIFF>))
{
if ($line =~ /^\+\+\+ /)
@@ -138,12 +139,15 @@ sub print_changelog_deltas ($$)
my $separator = "*"x70 ."\n";
$line =~ s///;
$line =~ s/\s.*//;
+ $prev_printed_line_empty
+ or print "\n";
print $separator, $line, $separator;
}
elsif ($line =~ /^\+/)
{
$line =~ s///;
print $line;
+ $prev_printed_line_empty = ($line =~ /^$/);
}
}
close DIFF;