From db07e8d303d06a5dabdb7ae8929b44c84b448bfe Mon Sep 17 00:00:00 2001 From: Rick L Bird Date: Thu, 5 May 2011 17:38:23 -0400 Subject: [PATCH] PennMUSH 1.8.3p11 Author: allthecoolkidshaveone Date: Fri Sep 11 17:20:46 2009 +0000 Raevnos can't spel gud. Author: allthecoolkidshaveone Date: Fri Sep 11 17:17:41 2009 +0000 Add script for grepping changelogs. Fixes #170 --- utils/grep-cl.pl | 79 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100755 utils/grep-cl.pl diff --git a/utils/grep-cl.pl b/utils/grep-cl.pl new file mode 100755 index 0000000..0b2172c --- /dev/null +++ b/utils/grep-cl.pl @@ -0,0 +1,79 @@ +#!/usr/bin/perl -w + +# Tool to grep changelogs and show what versions mention a given string. + +use strict; +use Getopt::Std; + +sub HELP_MESSAGE { + print STDERR <) { + if (/^Version (\d[\d.]+ patchlevel \d+)/) { + print "Found $vmatches occurrences in $version\n" if $vmatches > 0 && !$opt_p; + $version = $1; + $vmatches = 0; + next; + } + if (/$pattern/) { + $matches++; + $vmatches++; + if ($opt_p) { + print "In version $version:\n" if $vmatches == 1; + print; + } + } + } + print "Found $vmatches occurrences in $version\n" if $vmatches > 0 && !$opt_p; + close CHANGELOG; +} + + +print "No occurrences of '$string' found.\n" if $matches == 0; + -- 2.30.2