comparison mcabber/contrib/events/eventcmd.pastebin @ 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 6df03b9b17ba
children
comparison
equal deleted inserted replaced
2168:87244845fd9c 2169:4889f429fdd0
32 [ x$1 != xMSG ] && exit 0 32 [ x$1 != xMSG ] && exit 0
33 [ x$2 != xIN ] && exit 0 33 [ x$2 != xIN ] && exit 0
34 34
35 jid=$3 35 jid=$3
36 # do nothing if it's from self 36 # do nothing if it's from self
37 [ "$jid" == "$me" ] && exit 0 37 [ "$jid" = "$me" ] && exit 0
38 38
39 # If receiving a message, scan for links 39 # If receiving a message, scan for links
40 url=$(cat "$4" | awk 'BEGIN { RS="( |\n|\t)+"; FS="¬"; } /(https?|ftp):\/\// { print $1 }') 40 url=$(cat "$4" | awk 'BEGIN { RS="( |\n|\t)+"; FS="¬"; } /(https?|ftp):\/\// { print $1 }')
41 41
42 if [ -n "$url" ]; then 42 if [ -n "$url" ]; then