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
This commit is contained in:
Eric Paris
2015-07-19 18:12:24 -05:00
parent 3b7c39656c
commit bf9c3cd6ec

View File

@@ -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}"
}