aboutsummaryrefslogtreecommitdiff
path: root/maintainer-scripts/update_web_docs_libstdcxx_git
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-01-13 21:26:54 +0000
committerJonathan Wakely <jwakely@redhat.com>2020-01-13 21:40:44 +0000
commit97e2f333087d180a78d92c99b038f0888ac63c02 (patch)
tree1473829cf0ad4a0645b1f2db6e516ea41a71b8ab /maintainer-scripts/update_web_docs_libstdcxx_git
parent20571289868b98dfff95f754fa174f395dec00af (diff)
downloadgcc-97e2f333087d180a78d92c99b038f0888ac63c02.zip
gcc-97e2f333087d180a78d92c99b038f0888ac63c02.tar.gz
gcc-97e2f333087d180a78d92c99b038f0888ac63c02.tar.bz2
Replace update_web_docs_libstdcxx_svn with update_web_docs_libstdcxx_git
This patch replaces the update_web_docs_libstdcxx_svn script, that updates online documentation from its sources in the GCC repository, run once a day from cron, with update_web_docs_libstdcxx_git. * update_web_docs_libstdcxx_git: New file. * update_web_docs_libstdcxx_svn: Remove. * crontab: Use update_web_docs_libstdcxx_git.
Diffstat (limited to 'maintainer-scripts/update_web_docs_libstdcxx_git')
-rwxr-xr-xmaintainer-scripts/update_web_docs_libstdcxx_git48
1 files changed, 48 insertions, 0 deletions
diff --git a/maintainer-scripts/update_web_docs_libstdcxx_git b/maintainer-scripts/update_web_docs_libstdcxx_git
new file mode 100755
index 0000000..570e7ff
--- /dev/null
+++ b/maintainer-scripts/update_web_docs_libstdcxx_git
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+
+# "sh update_web_docs_libstdcxx_git"
+# Checks out a copy of the libstdc++-v3 "inner" documentation and puts
+# it in the onlinedocs area. For an initial description of "inner"
+# docs, see the thread starting with
+# http://gcc.gnu.org/ml/libstdc++/2000-11/msg00475.html
+#####################################################################
+
+GITROOT=${GITROOT:-"/git/gcc.git"}
+GETTHIS='libstdc++-v3/doc/html'
+WWWDIR=/www/gcc/htdocs/onlinedocs/libstdc++
+#WWWDIR=/tmp/fake-onlinedocs-testing
+
+
+## No more changes should be needed. Ha, right, whatever.
+#####################################################################
+
+FILTER="newer or same age version exists|0 blocks"
+
+PATH=/usr/local/bin:$PATH
+export GITROOT
+
+test -d $WWWDIR || /bin/mkdir $WWWDIR
+test -d $WWWDIR || { echo something is very wrong ; exit 1; }
+
+WORKDIR=/tmp/v3-doc-update.$$
+/bin/rm -rf $WORKDIR
+/bin/mkdir $WORKDIR
+cd $WORKDIR
+
+
+# checkout all the HTML files, get down into an interesting directory
+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"
+
+err=${PIPESTATUS[1]}
+if [ $err -gt 0 ]; then
+ printf "\nCopying failed with error code %d.\n" $err
+fi
+
+cd /
+/bin/rm -rf $WORKDIR
+