From 507fc4d6a53c7389463336ccbcc9bae68ea40522 Mon Sep 17 00:00:00 2001 From: Jingyuan Liang Date: Fri, 10 Nov 2023 02:35:04 +0000 Subject: [PATCH] Remove bash-specific syntax in build scripts Fixes #105. --- build/build.sh | 3 +-- build/lint.sh | 3 +-- build/test.sh | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/build/build.sh b/build/build.sh index 77369df2..4dbffc8a 100755 --- a/build/build.sh +++ b/build/build.sh @@ -16,7 +16,6 @@ set -o errexit set -o nounset -set -o pipefail if [ -z "${OS:-}" ]; then echo "OS must be set" @@ -36,7 +35,7 @@ export GOARCH="${ARCH}" export GOOS="${OS}" export GO111MODULE=on -if [[ "${DEBUG:-}" == 1 ]]; then +if [ "${DEBUG:-}" = 1 ]; then # Debugging - disable optimizations and inlining gogcflags="all=-N -l" goasmflags="" diff --git a/build/lint.sh b/build/lint.sh index 59bf12b7..1b8b83c0 100755 --- a/build/lint.sh +++ b/build/lint.sh @@ -16,7 +16,6 @@ set -o errexit set -o nounset -set -o pipefail export CGO_ENABLED=0 export GO111MODULE=on @@ -25,7 +24,7 @@ cd tools >/dev/null go install github.com/golangci/golangci-lint/cmd/golangci-lint cd - >/dev/null -echo -n "Running golangci-lint: " +printf "Running golangci-lint: " ERRS=$(golangci-lint run "$@" 2>&1 || true) if [ -n "${ERRS}" ]; then echo "FAIL" diff --git a/build/test.sh b/build/test.sh index 413cdbf8..ef82e8dd 100755 --- a/build/test.sh +++ b/build/test.sh @@ -16,7 +16,6 @@ set -o errexit set -o nounset -set -o pipefail export CGO_ENABLED=0 export GO111MODULE=on