From 828f27dbcbe646bbfa0de13195875eab73f23b9d Mon Sep 17 00:00:00 2001 From: "Ahmed R. Awadallah" Date: Fri, 6 Sep 2019 11:53:34 -0400 Subject: [PATCH 1/7] attempt to fix build correcting error message from travis ci In ./github-dev/cleanup-pr-branch line 5: if [[ ! -z "$TOKEN" ]]; then ^-- SC2236: Use -n instead of ! -z. --- github-dev/cleanup-pr-branch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-dev/cleanup-pr-branch b/github-dev/cleanup-pr-branch index 3af244609..230c281d5 100755 --- a/github-dev/cleanup-pr-branch +++ b/github-dev/cleanup-pr-branch @@ -2,7 +2,7 @@ set -e set -o pipefail -if [[ ! -z "$TOKEN" ]]; then +if [[ ! -n "$TOKEN" ]]; then GITHUB_TOKEN=$TOKEN fi From 60d4bcdbf6afaec5091c0de00305ff956108156f Mon Sep 17 00:00:00 2001 From: "Ahmed R. Awadallah" Date: Fri, 6 Sep 2019 16:49:39 -0400 Subject: [PATCH 2/7] Update cleanup-pr-branch --- github-dev/cleanup-pr-branch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-dev/cleanup-pr-branch b/github-dev/cleanup-pr-branch index 230c281d5..4a28a96bf 100755 --- a/github-dev/cleanup-pr-branch +++ b/github-dev/cleanup-pr-branch @@ -2,7 +2,7 @@ set -e set -o pipefail -if [[ ! -n "$TOKEN" ]]; then +if [[ -n "$TOKEN" ]]; then GITHUB_TOKEN=$TOKEN fi From aa165501a3f460e3e2b67c6602b35d40191f8765 Mon Sep 17 00:00:00 2001 From: "Ahmed R. Awadallah" Date: Fri, 6 Sep 2019 16:53:01 -0400 Subject: [PATCH 3/7] Update release-email-notification corrected SC2236 --- github-dev/release-email-notification | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-dev/release-email-notification b/github-dev/release-email-notification index c749ecb8e..c39e55ad6 100755 --- a/github-dev/release-email-notification +++ b/github-dev/release-email-notification @@ -8,7 +8,7 @@ if [[ -z "$MAILGUN_API_KEY" ]]; then exit 1 fi -if [[ ! -z "$MAILGUN_DOMAIN" ]]; then +if [[ -n "$MAILGUN_DOMAIN" ]]; then MAILGUN_DOMAIN_NAME=$MAILGUN_DOMAIN fi From 129e651e11cec2594361af5d68ec3d24d734a12f Mon Sep 17 00:00:00 2001 From: "Ahmed R. Awadallah" Date: Fri, 6 Sep 2019 16:53:57 -0400 Subject: [PATCH 4/7] Update upload-assets correct SC2236 --- github-dev/upload-assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-dev/upload-assets b/github-dev/upload-assets index b7936c9ef..854bf54a1 100755 --- a/github-dev/upload-assets +++ b/github-dev/upload-assets @@ -1,6 +1,6 @@ #!/bin/bash -if [[ ! -z "$TOKEN" ]]; then +if [[ -n "$TOKEN" ]]; then GITHUB_TOKEN=$TOKEN fi From cb84ef838983b0ceddde6877746ead00d3da2c2e Mon Sep 17 00:00:00 2001 From: "Ahmed R. Awadallah" Date: Fri, 6 Sep 2019 17:05:42 -0400 Subject: [PATCH 5/7] Update sendemail Fix SC2236 --- mailgun/sendemail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailgun/sendemail b/mailgun/sendemail index ce1a28b35..a1e2ba802 100755 --- a/mailgun/sendemail +++ b/mailgun/sendemail @@ -8,7 +8,7 @@ if [[ -z "$MAILGUN_API_KEY" ]]; then exit 1 fi -if [[ ! -z "$MAILGUN_DOMAIN" ]]; then +if [[ -n "$MAILGUN_DOMAIN" ]]; then MAILGUN_DOMAIN_NAME=$MAILGUN_DOMAIN fi From e7c467536bb8ebe9e1dc2cecd94561a14efefc76 Mon Sep 17 00:00:00 2001 From: "Ahmed R. Awadallah" Date: Fri, 6 Sep 2019 17:06:37 -0400 Subject: [PATCH 6/7] Update entrypoint.sh Fix SC2236 --- mutt/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutt/entrypoint.sh b/mutt/entrypoint.sh index 86ca55ee2..90a72eee7 100755 --- a/mutt/entrypoint.sh +++ b/mutt/entrypoint.sh @@ -47,7 +47,7 @@ if [ -d "$HOME/.gnupg" ]; then if [ -f "/usr/share/doc/mutt/examples/gpg.rc" ]; then echo 'source /usr/share/doc/mutt/examples/gpg.rc' fi - if [ ! -z "$GPG_ID" ]; then + if [ -n "$GPG_ID" ]; then echo "set pgp_sign_as = $GPG_ID" fi echo 'set crypt_replysign=yes' From 83ceb5a2d0bfa64bd36dc30dbcda896d1751f083 Mon Sep 17 00:00:00 2001 From: "Ahmed R. Awadallah" Date: Fri, 6 Sep 2019 17:08:33 -0400 Subject: [PATCH 7/7] Update run Fix SC2236 --- postfix/service/postfix/run | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/postfix/service/postfix/run b/postfix/service/postfix/run index 97c0e924c..6a73ecfb8 100755 --- a/postfix/service/postfix/run +++ b/postfix/service/postfix/run @@ -14,7 +14,7 @@ EOF # shellcheck disable=SC1091 [ -f /etc/service/postfix/run.config ] && source /etc/service/postfix/run.config -if [[ ! -z "$MAILNAME" ]]; then +if [[ -n "$MAILNAME" ]]; then echo "$MAILNAME" > /etc/mailname postconf -e myorigin="/etc/mailname" @@ -25,15 +25,15 @@ if [[ ! -z "$MAILNAME" ]]; then EOF fi -if [[ ! -z "$MY_NETWORKS" ]]; then +if [[ -n "$MY_NETWORKS" ]]; then postconf -e mynetworks="$MY_NETWORKS" fi -if [[ ! -z "$MY_DESTINATION" ]]; then +if [[ -n "$MY_DESTINATION" ]]; then postconf -e mydestination="$MY_DESTINATION" fi -if [[ ! -z "$ROOT_ALIAS" ]]; then +if [[ -n "$ROOT_ALIAS" ]]; then if [[ -f /etc/aliases ]]; then sed -i '/^root:/d' /etc/aliases fi @@ -41,7 +41,7 @@ if [[ ! -z "$ROOT_ALIAS" ]]; then newaliases fi -if [[ ! -z "$RELAY" ]]; then +if [[ -n "$RELAY" ]]; then # setup the relay cat >> /etc/postfix/main.cf <<- EOF relayhost = $RELAY @@ -52,7 +52,7 @@ if [[ ! -z "$RELAY" ]]; then EOF fi -if [[ ! -z "$TLS" ]]; then +if [[ -n "$TLS" ]]; then # setup tls cat >> /etc/postfix/main.cf <<- EOF smtp_use_tls = yes @@ -60,7 +60,7 @@ if [[ ! -z "$TLS" ]]; then EOF fi -if [[ ! -z "$SASL_AUTH" ]]; then +if [[ -n "$SASL_AUTH" ]]; then cat >> /etc/postfix/main.cf <<- EOF smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd