So, I was debugging why the nightly run of this script did not actually
every update anything.  As part of that I manually ran the script on
gcc.gnu.org. 

Let's say the output was not particularly helpful. ;-)

This patch addresses that and does not simply ignore _all_ output any
more, plus it explicitly issues an error message if there was any problem.

http://gcc.gnu.org/ml/gccadmin/2013-q2/msg00004.html shows exemplary
output.


I have not committed this yet, but plan on doing that unless there are
any objections.  Thoughts?

Gerald

2013-04-05  Gerald Pfeifer  <ger...@pfeifer.com>

        * update_web_docs_libstdcxx_svn: No longer ignore all output from
        the actual copy process.
        Check the exit code of the actual copy process; diagnose problems.

Index: update_web_docs_libstdcxx_svn
===================================================================
--- update_web_docs_libstdcxx_svn       (revision 197262)
+++ update_web_docs_libstdcxx_svn       (working copy)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 
 # "sh update_web_docs_libstdcxx.sh"
@@ -39,8 +39,13 @@
 
 # copy the tree to the onlinedocs area, preserve directory structure
 #find . -depth -print | cpio -pdv $WWWDIR
-find . -depth -print | cpio -pd $WWWDIR > /dev/null 2>&1
+find . -depth -print | cpio -pd $WWWDIR 2>&1 | grep -v "newer or same age 
version exists"
 
+err=${PIPESTATUS[1]}
+if [ $err -gt 0 ]; then
+    printf "\nCopying failed with error code %d.\n" $err
+fi
+
 cd /
 /bin/rm -rf $WORKDIR
 

Reply via email to