X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=tools%2Fremovals.pl;h=b07845bf0c122d1e04b75b4d5070313ddae7a68d;hb=c588b7c17dd0c0ad755bb30bf5273fc8ca2e69b9;hp=ec65f15c0519daa21527973f5adbecfdb5f741d5;hpb=be23f99a52455cab4bf791c137463c8fdc4ae5c5;p=dak.git diff --git a/tools/removals.pl b/tools/removals.pl index ec65f15c..b07845bf 100755 --- a/tools/removals.pl +++ b/tools/removals.pl @@ -55,14 +55,14 @@ $rss->channel( } ); -for (0..15) { - my $i = $_; +my $num_to_display = 16; +for my $removal (@removals ) { my ($null, $date, $ftpmaster, $body, $reason); - $removals[$i] =~ s/=========================================================================//g; - $removals[$i] =~ m/\[Date: ([^]]+)\] \[ftpmaster: ([^]]+)\]/; + $removal =~ s/=========================================================================//g; + $removal =~ m/\[Date: ([^]]+)\] \[ftpmaster: ([^]]+)\]/; $date = $1; $ftpmaster = $2; - ($null, $body) = split /\n/, $removals[$i], 2; + ($null, $body) = split /\n/, $removal, 2; chomp $body; $body =~ m/---- Reason ---.*\n(.*)/; $reason = $1; @@ -77,5 +77,7 @@ for (0..15) { } ); + $num_to_display -= 1; + last unless $num_to_display; } print $rss->as_string;