Fix shellcheck failures on clean.sh and cache_go_dirs.sh

update pull request
This commit is contained in:
aaa
2019-04-19 13:36:23 -04:00
parent ac1557a886
commit 5f719707f2
3 changed files with 7 additions and 9 deletions

View File

@@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
source "${KUBE_ROOT}/hack/lib/util.sh"
CLEAN_PATTERNS=(
@@ -28,11 +28,11 @@ CLEAN_PATTERNS=(
"test/e2e/generated/bindata.go"
)
for pattern in ${CLEAN_PATTERNS[@]}; do
for match in $(find "${KUBE_ROOT}" -iregex "^${KUBE_ROOT}/${pattern}$"); do
for pattern in "${CLEAN_PATTERNS[@]}"; do
while IFS=$'\n' read -r -d match; do
echo "Removing ${match#${KUBE_ROOT}\/} .."
rm -rf "${match#${KUBE_ROOT}\/}"
done
done < <(find "${KUBE_ROOT}" -iregex "^${KUBE_ROOT}/${pattern}$")
done
# ex: ts=2 sw=2 et filetype=sh