From: martin f. krafft Date: Sat, 22 May 2010 11:18:16 +0000 (+0200) Subject: trim message in case url is empty X-Git-Url: https://git.madduck.net/code/fbi-announce.git/commitdiff_plain/refs/heads/master?ds=sidebyside trim message in case url is empty Signed-off-by: martin f. krafft --- diff --git a/fbi-announce.sh b/fbi-announce.sh index c9ee6db..7084136 100755 --- a/fbi-announce.sh +++ b/fbi-announce.sh @@ -85,6 +85,11 @@ else eval "msg=\"$msg\"" fi +# trim $msg of empty []'s in case no URL was provided, might be better done in +# the above by making the generation conditional, but this will also do for +# now. +msg="${msg% []}" + ${sendmail} <<_eom ${from:+From: ${from} }To: ${to}