From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EA58C1382C5 for ; Mon, 1 Feb 2021 04:04:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 24512E09CF; Mon, 1 Feb 2021 04:04:53 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0F376E09CF for ; Mon, 1 Feb 2021 04:04:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C3089340EBE for ; Mon, 1 Feb 2021 04:04:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 930E44B7 for ; Mon, 1 Feb 2021 04:04:48 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1612135633.7b51adc7521e137a33c5a5924b03054dc736585f.mattst88@gentoo> Subject: [gentoo-commits] proj/releng:master commit in: tools/ X-VCS-Repository: proj/releng X-VCS-Files: tools/catalyst-auto X-VCS-Directories: tools/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 7b51adc7521e137a33c5a5924b03054dc736585f X-VCS-Branch: master Date: Mon, 1 Feb 2021 04:04:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b23683a1-6b5b-47ed-865b-62689ce8f817 X-Archives-Hash: add8abb916ea1b976a6a2b0719e8558e commit: 7b51adc7521e137a33c5a5924b03054dc736585f Author: Matt Turner gentoo org> AuthorDate: Sun Jan 31 23:24:53 2021 +0000 Commit: Matt Turner gentoo org> CommitDate: Sun Jan 31 23:27:13 2021 +0000 URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=7b51adc7 tools: Simplify nonetwork handling ... and fix the indentation. Signed-off-by: Matt Turner gentoo.org> tools/catalyst-auto | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/catalyst-auto b/tools/catalyst-auto index 70be8055..1f053048 100755 --- a/tools/catalyst-auto +++ b/tools/catalyst-auto @@ -53,7 +53,7 @@ EOH } send_email() { - if [[ ${nonetwork} == 0 ]]; then + [[ ${nonetwork} == 0 ]] || return local subject="${EMAIL_SUBJECT_PREPEND} $1" local message=$2 @@ -69,8 +69,6 @@ send_email() { printf 'From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n%b' \ "${EMAIL_FROM}" "${EMAIL_TO}" "${subject}" "${body}" | \ /usr/sbin/sendmail -f "${EMAIL_FROM}" ${EMAIL_TO//,/ } - - fi } # Usage: run_cmd @@ -249,7 +247,7 @@ git_update() { # SSH fingerprint from DNS. To do this securely, we need to ensure DNSSEC is # working. verify_dnssec() { - if [[ ${nonetwork} == 0 ]]; then + [[ ${nonetwork} == 0 ]] || return which dig >/dev/null || { echo "net-dns/bind-tools is needed to verify DNSSEC is working" @@ -265,8 +263,6 @@ verify_dnssec() { echo "DNSSEC is not enabled in /etc/resolv.conf" exit 1 fi - - fi } upload() {