From: Colin Watson Date: Tue, 6 May 2008 14:16:03 +0000 (+0000) Subject: add hacky LP bug notification helper X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=b4cf9e3fd79f925d0907bd4c2682159af19b876a;p=bin.git add hacky LP bug notification helper --- diff --git a/lp-bug-notify-helper b/lp-bug-notify-helper new file mode 100755 index 0000000..578afb9 --- /dev/null +++ b/lp-bug-notify-helper @@ -0,0 +1,23 @@ +#! /bin/sh +set -e + +formail -cz -X Subject: -X X-Launchpad-Bug: | \ + perl -nle ' + s/\s+/ /g; + if (s/^Subject:\s+//i) { + s/^\[Bug (\d+)\] \[NEW\] // or exit 0; + $bug = $1; + $subj = $_; + } elsif (s/^X-Launchpad-Bug:\s+//i) { + if (/\bimportance=(\w+)/) { + $imp = $1; + } + } + END { + if (defined $bug and defined $subj) { + $imp = "Undecided" unless defined $imp; + open FILE, ">>$ENV{HOME}/.irssi/fnotify"; + print FILE "LPBUG $bug $imp $subj"; + close FILE; + } + }'