From 46efbec13b03d2e3cfb046b9b6cab42319e4e48a Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sun, 28 Jul 2013 02:59:05 -0700 Subject: [PATCH] clone.sh/update.sh: allow mail to fail without aborting The mail operation occurs after everything else has succeeded. If it should fail for some reason there's really not much that can be done at that point especially since the normal course of action would be to mail a message about the failure. Just ignore the mail failure since the operation was a success. --- jobd/update.sh | 2 +- taskd/clone.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jobd/update.sh b/jobd/update.sh index 4fa1315..46653d8 100755 --- a/jobd/update.sh +++ b/jobd/update.sh @@ -174,7 +174,7 @@ if [ -e .banged ]; then { echo "$proj update succeeded - failure recovery" echo "this status message may be disabled on the project admin page" - } | mail -s "[$cfg_name] $proj update succeeded" "$mailaddrs" + } | mail -s "[$cfg_name] $proj update succeeded" "$mailaddrs" || : rm .banged fi diff --git a/taskd/clone.sh b/taskd/clone.sh index 0453e40..da1494f 100755 --- a/taskd/clone.sh +++ b/taskd/clone.sh @@ -138,7 +138,7 @@ git update-server-info trap "" EXIT [ -z "$mailaddrs" ] || -mail -s "[$cfg_name] $proj clone completed" "$mailaddrs" <