Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/releng:master commit in: tools/
Date: Sun, 26 Feb 2023 23:28:04
Message-Id: 1677454022.bdebb3c30ecfbce561a572ad6a8dfce281c322e1.dilfridge@gentoo
1 commit: bdebb3c30ecfbce561a572ad6a8dfce281c322e1
2 Author: Nic Boet <nic <AT> boet <DOT> cc>
3 AuthorDate: Sun Feb 26 23:27:02 2023 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 26 23:27:02 2023 +0000
6 URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=bdebb3c3
7
8 Improve send_mail() because it acts more like the logger
9
10 * output failure events to stdout if verbose set, useful for those without a mailer
11 * do not email if recipient var is undef; allows flexibility for non-releng use cases
12
13 Signed-off-by: Nic Boet <nic <AT> boet.cc>
14 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
15
16 tools/catalyst-auto | 6 ++++++
17 1 file changed, 6 insertions(+)
18
19 diff --git a/tools/catalyst-auto b/tools/catalyst-auto
20 index 1780daf4..c6b303f5 100755
21 --- a/tools/catalyst-auto
22 +++ b/tools/catalyst-auto
23 @@ -53,8 +53,14 @@ EOH
24 }
25
26 send_email() {
27 + if [[ ${verbose} -ge 1 ]]; then
28 + echo "$1 $2 build log at $3"
29 + fi
30 +
31 [[ ${nonetwork} == 0 ]] || return
32
33 + [[ ! -z ${EMAIL_TO} ]] || return
34 +
35 local subject="${EMAIL_SUBJECT_PREPEND} $1"
36 local message=$2
37 local logfile=$3