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>
This commit is contained in:
parent
f2e3c07e81
commit
bdebb3c30e
|
@ -53,8 +53,14 @@ EOH
|
||||||
}
|
}
|
||||||
|
|
||||||
send_email() {
|
send_email() {
|
||||||
|
if [[ ${verbose} -ge 1 ]]; then
|
||||||
|
echo "$1 $2 build log at $3"
|
||||||
|
fi
|
||||||
|
|
||||||
[[ ${nonetwork} == 0 ]] || return
|
[[ ${nonetwork} == 0 ]] || return
|
||||||
|
|
||||||
|
[[ ! -z ${EMAIL_TO} ]] || return
|
||||||
|
|
||||||
local subject="${EMAIL_SUBJECT_PREPEND} $1"
|
local subject="${EMAIL_SUBJECT_PREPEND} $1"
|
||||||
local message=$2
|
local message=$2
|
||||||
local logfile=$3
|
local logfile=$3
|
||||||
|
|
Loading…
Reference in a new issue