diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index f6261b9bc7a..94fe434bb5b 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -399,7 +399,7 @@ kube::golang::place_bins() { if [[ -d "${full_binpath_src}" ]]; then mkdir -p "${KUBE_OUTPUT_BINPATH}/${platform}" find "${full_binpath_src}" -maxdepth 1 -type f -exec \ - rsync -ptc {} "${KUBE_OUTPUT_BINPATH}/${platform}" \; + rsync -pc {} "${KUBE_OUTPUT_BINPATH}/${platform}" \; fi done } diff --git a/hack/make-rules/helpers/cache_go_dirs.sh b/hack/make-rules/helpers/cache_go_dirs.sh index 7efc2ee869d..282022a8474 100755 --- a/hack/make-rules/helpers/cache_go_dirs.sh +++ b/hack/make-rules/helpers/cache_go_dirs.sh @@ -60,9 +60,9 @@ fi mkdir -p $(dirname "${CACHE}") if $("${NEED_FIND}"); then kfind -type f -name \*.go \ - | xargs -n1 dirname \ - | LC_ALL=C sort -u \ + | sed 's|/[^/]*$||' \ | sed 's|^./||' \ + | LC_ALL=C sort -u \ > "${CACHE}" fi cat "${CACHE}"