From bf9c3cd6ec667006edbbd5bc8335bb38edb61987 Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Sun, 19 Jul 2015 18:12:24 -0500 Subject: [PATCH] Use cp instead of rsync in hack/verify-gendocs.sh Instead of calling rsync over and over and over and over and over and over and over and over and over (and probably over) use one `cp` Before: real 0m5.247s user 0m2.294s sys 0m1.300s After: real 0m2.260s user 0m2.230s sys 0m0.936s --- hack/lib/util.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hack/lib/util.sh b/hack/lib/util.sh index 38ae262dcc2..82ad2354a72 100755 --- a/hack/lib/util.sh +++ b/hack/lib/util.sh @@ -171,7 +171,11 @@ kube::util::gen-doc() { done <"${dest}/.files_generated" # put the new generated file into the destination - find "${tmpdir}" -exec rsync -pt {} "${dest}" \; >/dev/null + # the shopt is so that we get .files_generated from the glob. + shopt -s dotglob + cp -af "${tmpdir}"/* "${dest}" + shopt -u dotglob + #cleanup rm -rf "${tmpdir}" }