From 86d762dc31655e4677678ec643ab3024f42753e3 Mon Sep 17 00:00:00 2001 From: Chizi123 <build@jsrv.com> Date: Sun, 20 Sep 2020 23:21:20 +0000 Subject: [PATCH] modified email message --- main.sh | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/main.sh b/main.sh index 62d0f10..86de2d6 100755 --- a/main.sh +++ b/main.sh @@ -161,6 +161,16 @@ return 0 } +function send_email { + ( + echo "From: build@localhost" + echo "To: $EMAIL" + echo "Subject: Build errors" + echo "There were build errors for the build at $(date), please address them soon." + echo "The errors were: $ERRORS" + ) | sendmail -t +} + case $1 in "init") init;; @@ -171,11 +181,7 @@ if [ "$ERRORS" != "" ]; then echo "Errors in packages $ERRORS" if [ "$EMAIL" != "" ]; then - echo "To: $EMAIL - Subject: Build errors - - There were build errors for the build at $(date), please address them soon - The errors were: $ERRORS" | sendmail -t + send_email fi else echo "All packages built successfully" -- Gitblit v1.9.3