commit: 7b51adc7521e137a33c5a5924b03054dc736585f Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> AuthorDate: Sun Jan 31 23:24:53 2021 +0000 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> 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 <mattst88 <AT> 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 <logfile> <command to run> @@ -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() {