From e17ae96781111c40418047cf6624ffd6d662da08 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Sat, 12 Aug 2017 00:08:54 +0200 Subject: [PATCH] Change cp -a to rsync -a --delete-delay to remove old, unused files. --- build_docs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build_docs.py b/build_docs.py index 7d84e1c..784d7fd 100644 --- a/build_docs.py +++ b/build_docs.py @@ -207,7 +207,7 @@ def build_one(version, isdev, quick, venv, build_root, www_root, shell_out("chown -R :{} Doc/build/html/".format(group)) shell_out("chmod -R o+r Doc/build/html/") shell_out("find Doc/build/html/ -type d -exec chmod o+x {} ';'") - shell_out("cp -a Doc/build/html/* %s" % target) + shell_out("rsync -a --delete-delay Doc/build/html/ %s" % target) if not quick: logging.debug("Copying dist files") shell_out("chown -R :{} Doc/dist/".format(group)) @@ -244,7 +244,8 @@ def build_devguide(devguide_checkout, devguide_target, venv, changed = changed_files(build_directory, devguide_target) shell_out("mkdir -p {}".format(devguide_target)) shell_out("find %s -type d -exec chmod o+x {} ';'" % (build_directory,)) - shell_out("cp -a {}/* {}".format(build_directory, devguide_target)) + shell_out("rsync -a --delete-delay {}/ {}".format( + build_directory, devguide_target)) shell_out("chmod -R o+r %s" % (devguide_target,)) if changed and not skip_cache_invalidation: prefix = os.path.basename(devguide_target)