From b4cf9e3fd79f925d0907bd4c2682159af19b876a Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 6 May 2008 14:16:03 +0000 Subject: [PATCH] add hacky LP bug notification helper --- lp-bug-notify-helper | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 lp-bug-notify-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; + } + }' -- 2.30.2