aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNic Boet <nic@boet.cc>2023-02-27 00:27:02 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2023-02-27 00:27:02 +0100
commitbdebb3c30ecfbce561a572ad6a8dfce281c322e1 (patch)
tree7c99b7778efbabece776a7845c5a78df31517032 /tools/catalyst-auto
parentMake it more apparent that bash time is not used (diff)
downloadreleng-bdebb3c30ecfbce561a572ad6a8dfce281c322e1.tar.gz
releng-bdebb3c30ecfbce561a572ad6a8dfce281c322e1.tar.bz2
releng-bdebb3c30ecfbce561a572ad6a8dfce281c322e1.zip
Improve send_mail() because it acts more like the logger
* output failure events to stdout if verbose set, useful for those without a mailer * do not email if recipient var is undef; allows flexibility for non-releng use cases Signed-off-by: Nic Boet <nic@boet.cc> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Diffstat (limited to 'tools/catalyst-auto')
-rwxr-xr-xtools/catalyst-auto6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/catalyst-auto b/tools/catalyst-auto
index 1780daf4..c6b303f5 100755
--- a/tools/catalyst-auto
+++ b/tools/catalyst-auto
@@ -53,8 +53,14 @@ EOH
}
send_email() {
+ if [[ ${verbose} -ge 1 ]]; then
+ echo "$1 $2 build log at $3"
+ fi
+
[[ ${nonetwork} == 0 ]] || return
+ [[ ! -z ${EMAIL_TO} ]] || return
+
local subject="${EMAIL_SUBJECT_PREPEND} $1"
local message=$2
local logfile=$3