mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 05:02:50 +00:00
Fix shellcheck failures on clean.sh and cache_go_dirs.sh
update pull request
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user