Fix shellcheck for more scripts in hack

Making more of the scripts in hack pass the shellcheck linter.
This commit is contained in:
mattjmcnaughton
2019-02-22 09:51:42 -05:00
parent 139a13d312
commit 57c51c741d
6 changed files with 12 additions and 16 deletions

View File

@@ -17,7 +17,8 @@ set -o errexit
set -o nounset
set -o pipefail
export KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
export KUBE_ROOT
source "${KUBE_ROOT}/hack/lib/init.sh"
# Ensure that we find the binaries we build before anything else.
@@ -30,5 +31,5 @@ go install k8s.io/kubernetes/vendor/github.com/client9/misspell/cmd/misspell
# Spell checking
# All the skipping files are defined in hack/.spelling_failures
skipping_file="${KUBE_ROOT}/hack/.spelling_failures"
failing_packages=$(echo `cat ${skipping_file}` | sed "s| | -e |g")
git ls-files | grep -v -e ${failing_packages} | xargs misspell -i "Creater,creater,ect" -error -o stderr
failing_packages=$(sed "s| | -e |g" "${skipping_file}")
git ls-files | grep -v -e "${failing_packages}" | xargs misspell -i "Creater,creater,ect" -error -o stderr