]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
maintainer-scripts: Improve syncing of libstdc++ docs
authorGerald Pfeifer <gerald@pfeifer.com>
Mon, 1 Sep 2025 19:56:52 +0000 (20:56 +0100)
committerGerald Pfeifer <gerald@pfeifer.com>
Mon, 1 Sep 2025 19:58:02 +0000 (20:58 +0100)
rsync generally is a more commonly used tool for syncing data - among
others it retains time stamps and is able to remove orphaned files on
the receiver side.

We just need to exclude some directories and a symlink from being
removed as "orphaned", since they originate elsewhere.

maintainer-scripts:
* update_web_docs_libstdcxx_git: Copy our "inner" documentation
into the web area using rsync instead of cpio and remove orphaned
files.

maintainer-scripts/update_web_docs_libstdcxx_git

index 570e7fffb13430b7e5f5a9fe80d4e1da2b3970d5..6fbf2f84ecb734d26ea2fd87b8af8940c064fc5b 100755 (executable)
@@ -35,8 +35,9 @@ cd $WORKDIR
 git -C $GITROOT archive master $GETTHIS | tar xf -
 cd $GETTHIS
 
-# copy the tree to the onlinedocs area, preserve directory structure
-find . -depth -print | cpio -pd $WWWDIR 2>&1 | egrep -v "$FILTER"
+# Copy the tree to the libstdc++ onlinedocs area and remove orphans (taking
+# care to keep some directories coming from a different source).
+rsync -ahv --delete-after -f '- /images/*' -f '- /libstdc*' -f '- latest-doxygen' . $WWWDIR 2>&1 | egrep -v "$FILTER"
 
 err=${PIPESTATUS[1]}
 if [ $err -gt 0 ]; then
@@ -45,4 +46,3 @@ fi
 
 cd /
 /bin/rm -rf $WORKDIR
-