diff --git a/script/code-gen.sh b/script/code-gen.sh index 0d1f309c2..f03f3f0a0 100755 --- a/script/code-gen.sh +++ b/script/code-gen.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# shellcheck disable=SC2046 set -e -o pipefail +# shellcheck disable=SC1091 # Cannot check source of this file source /go/src/k8s.io/code-generator/kube_codegen.sh git config --global --add safe.directory "/go/src/${PROJECT_MODULE}" diff --git a/script/release-packages.sh b/script/release-packages.sh index 5f67c3c4c..18ed92d3b 100755 --- a/script/release-packages.sh +++ b/script/release-packages.sh @@ -15,9 +15,9 @@ for os in linux darwin windows freebsd openbsd; do go clean -cache done -cat dist/**/*_checksums.txt >> dist/traefik_${VERSION}_checksums.txt +cat dist/**/*_checksums.txt >> "dist/traefik_${VERSION}_checksums.txt" rm dist/**/*_checksums.txt -tar cfz dist/traefik-${VERSION}.src.tar.gz \ +tar cfz "dist/traefik-${VERSION}.src.tar.gz" \ --exclude-vcs \ --exclude .idea \ --exclude .travis \ @@ -25,4 +25,4 @@ tar cfz dist/traefik-${VERSION}.src.tar.gz \ --exclude .github \ --exclude dist . -chown -R $(id -u):$(id -g) dist/ +chown -R "$(id -u)":"$(id -g)" dist/ diff --git a/script/validate-shell-script.sh b/script/validate-shell-script.sh index 5f785128d..132ab7051 100755 --- a/script/validate-shell-script.sh +++ b/script/validate-shell-script.sh @@ -6,6 +6,7 @@ script_dir="$( cd "$( dirname "${0}" )" && pwd -P)" if command -v shellcheck then + exit_code=0 # The list of shell script come from the (grep ...) command, feeding the loop while IFS= read -r script_to_check do @@ -18,7 +19,13 @@ then | grep -v '.git/' | grep -v 'vendor/' | grep -v 'node_modules/' \ | cut -d':' -f1 ) - wait # Wait for all background command to be completed + # Wait for all background command to be completed + for p in $(jobs -p) + do + wait "$p" || exit_code=$? + done + exit $exit_code else echo "== Command shellcheck not found in your PATH. No shell script checked." + exit 1 fi