# HG changeset patch # User Mikael Berthe # Date 1423998742 -3600 # Node ID 4889f429fdd05e76ad4dff5885e277a4ee4db129 # Parent 87244845fd9ca1027d334b3be2fc291cfcf91727 Get read of bashism in contrib/events/eventcmd.pastebin thanks to Raphael Geissert, see Debian BTS issue ##772307. diff -r 87244845fd9c -r 4889f429fdd0 mcabber/contrib/events/eventcmd --- 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. diff -r 87244845fd9c -r 4889f429fdd0 mcabber/contrib/events/eventcmd.osd --- a/mcabber/contrib/events/eventcmd.osd Thu Dec 11 20:19:37 2014 +0100 +++ b/mcabber/contrib/events/eventcmd.osd Sun Feb 15 12:12:22 2015 +0100 @@ -17,7 +17,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 @@ -38,7 +38,7 @@ # 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 "<$arg2> has changed status to: [$arg1]" | $XOSD_CMD_PIPE > /dev/null 2>&1 echo > /dev/null diff -r 87244845fd9c -r 4889f429fdd0 mcabber/contrib/events/eventcmd.pastebin --- a/mcabber/contrib/events/eventcmd.pastebin Thu Dec 11 20:19:37 2014 +0100 +++ b/mcabber/contrib/events/eventcmd.pastebin Sun Feb 15 12:12:22 2015 +0100 @@ -34,7 +34,7 @@ jid=$3 # do nothing if it's from self -[ "$jid" == "$me" ] && exit 0 +[ "$jid" = "$me" ] && exit 0 # If receiving a message, scan for links url=$(cat "$4" | awk 'BEGIN { RS="( |\n|\t)+"; FS="¬"; } /(https?|ftp):\/\// { print $1 }')