diff mcabber/contrib/events/eventcmd @ 2169:4889f429fdd0

Get read of bashism in contrib/events/eventcmd.pastebin thanks to Raphael Geissert, see Debian BTS issue ##772307.
author Mikael Berthe <mikael@lilotux.net>
date Sun, 15 Feb 2015 12:12:22 +0100
parents cca19ce862ef
children
line wrap: on
line diff
--- a/mcabber/contrib/events/eventcmd	Thu Dec 11 20:19:37 2014 +0100
+++ b/mcabber/contrib/events/eventcmd	Sun Feb 15 12:12:22 2015 +0100
@@ -19,7 +19,7 @@
 # Note that the 4th argument is only provided for incoming messages
 # and when 'event_log_files' is set.
 
-if [ $event = "MSG" ]; then
+if [ "$event" = "MSG" ]; then
   case "$arg1" in
     IN)
       # Incoming message from buddy $arg2
@@ -40,10 +40,10 @@
       # Outgoing message for buddy $arg2
       ;;
   esac
-elif [ $event = "STATUS" ]; then
+elif [ "$event" = "STATUS" ]; then
   # Buddy $arg2 status is $arg1 (_, O, I, F, D, N, A)
   echo > /dev/null
-elif [ $event = "UNREAD" ]; then
+elif [ "$event" = "UNREAD" ]; then
   # $arg1 contains 4 numbers separated with space chars:
   # Nr of unread buffers, nr of unread buffers with attention sign,
   # nr of MUC unread buffers, nr of MUC unread buffers with attention sign.