From: Rick L Bird Date: Thu, 5 May 2011 21:38:23 +0000 (-0400) Subject: PennMUSH 1.8.3p11 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=db07e8d303d06a5dabdb7ae8929b44c84b448bfe;p=cobramush.git 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 --- 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; +