From a02c80cf76eedb0c6f27b2026a646aeff82be1ad Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 3 Dec 2017 16:42:14 +0100 Subject: [PATCH] Check exit code directly --- process/send-zip-report | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/process/send-zip-report b/process/send-zip-report index 4859ef4e5..89f742b82 100755 --- a/process/send-zip-report +++ b/process/send-zip-report @@ -43,8 +43,7 @@ done addr=$1 subject=$2 shift 2 -mutt -F "$ERESSEA/etc/muttrc" -s "$subject" -a "$@" -- "$addr" < "$TEMPLATE" -if [ $? -ne 0 ] ; then - echo "Sending failed for email/report: $2/$3" -fi +mutt -F "$ERESSEA/etc/muttrc" -s "$subject" -a "$@" -- "$addr" \ + < "$TEMPLATE" || echo "Sending failed for email/report: $2/$3" +