Skip to content

Commit 13a367b

Browse files
committed
Change cp -a to rsync -a --delete-delay to remove old, unused files.
1 parent 78c229d commit 13a367b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build_docs.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def build_one(version, isdev, quick, venv, build_root, www_root,
215215
shell_out("chown -R :{} Doc/build/html/".format(group))
216216
shell_out("chmod -R o+r Doc/build/html/")
217217
shell_out("find Doc/build/html/ -type d -exec chmod o+x {} ';'")
218-
shell_out("cp -a Doc/build/html/* %s" % target)
218+
shell_out("rsync -a --delete-delay Doc/build/html/ %s" % target)
219219
if not quick:
220220
logging.debug("Copying dist files")
221221
shell_out("chown -R :{} Doc/dist/".format(group))
@@ -252,7 +252,8 @@ def build_devguide(devguide_checkout, devguide_target, venv,
252252
changed = changed_files(build_directory, devguide_target)
253253
shell_out("mkdir -p {}".format(devguide_target))
254254
shell_out("find %s -type d -exec chmod o+x {} ';'" % (build_directory,))
255-
shell_out("cp -a {}/* {}".format(build_directory, devguide_target))
255+
shell_out("rsync -a --delete-delay {}/ {}".format(
256+
build_directory, devguide_target))
256257
shell_out("chmod -R o+r %s" % (devguide_target,))
257258
if changed and not skip_cache_invalidation:
258259
prefix = os.path.basename(devguide_target)

0 commit comments

Comments
 (0)