chiark / gitweb /
hacky LP bug support
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Wed, 30 Apr 2008 16:45:47 +0000 (16:45 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Wed, 30 Apr 2008 16:45:47 +0000 (16:45 +0000)
irssi-notify

index 6827ea19a39be40a2987226e10d9178547073640..9a9aac2938a23b4de5b9fb815c3d12934227143f 100755 (executable)
@@ -7,7 +7,22 @@ set -e
 ssh -n riva irssi-notify-server | \
        sed -u 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g' | \
        while read heading message; do
-               [ "$heading" != . ] || continue
-               notify-send -i gtk-dialog-info -t 300000 -- \
-                       "${heading}" "${message}"
+               case $heading in
+                       .)
+                               continue
+                               ;;
+                       LPBUG)
+                               bug="${message%% *}"
+                               message="${message#* }"
+                               imp="${message%% *}"
+                               message="${message#* }"
+                               notify-send -i gtk-dialog-info -t 300000 -- \
+                                       "New LP bug $bug ($imp)" \
+                                       "<a href=\"https://launchpad.net/bugs/$bug\">$message</a>"
+                               ;;
+                       *)
+                               notify-send -i gtk-dialog-info -t 300000 -- \
+                                       "${heading}" "${message}"
+                               ;;
+               esac
        done