Log script errors, fix bogus copy
authorPeter D. Barnes, Jr. <barnes26@llnl.gov>
Wed, 08 Aug 2012 14:04:05 -0700
changeset 8967 3594c3c9f942
parent 8966 060dba23e9bb
child 8968 513af4c1712d
Log script errors, fix bogus copy
doc/ns3_html_theme/get_version.sh
wscript
--- a/doc/ns3_html_theme/get_version.sh	Mon Aug 13 16:08:13 2012 -0700
+++ b/doc/ns3_html_theme/get_version.sh	Wed Aug 08 14:04:05 2012 -0700
@@ -185,11 +185,10 @@
 # This seems not always done automatically
 # by Sphinx when rebuilding
 cd doc 2>&1 >/dev/null
-for d in {manual,models,tutorial{,-pt-br}}/build/{single,}html/_static html \
-    html ; do
+for d in {manual,models,tutorial{,-pt-br}}/build/{single,}html/_static/ ; do
     # expect the copy to fail if the destination dir
     # hasn't been created by a prior doc build
-    cp ns3_html_theme/static/ns3_version.js $d 2>/dev/null
+    cp ns3_html_theme/static/ns3_version.js $d
 done
 cd - 2>&1 >/dev/null
 
@@ -197,3 +196,4 @@
 say
 say "outf = $outf:"
 cat -n $outf
+say Done.
\ No newline at end of file
--- a/wscript	Mon Aug 13 16:08:13 2012 -0700
+++ b/wscript	Wed Aug 08 14:04:05 2012 -0700
@@ -1075,6 +1075,7 @@
     _getVersion()
     doxygen_config = os.path.join('doc', 'doxygen.conf')
     if subprocess.Popen([env['DOXYGEN'], doxygen_config]).wait():
+        Logs.error("Doxygen build returned an error.")
         raise SystemExit(1)
 
 
@@ -1085,9 +1086,8 @@
 
     prog = "doc/ns3_html_theme/get_version.sh"
     if subprocess.Popen([prog]).wait() :
-        print "ERROR: " + prog
+        Logs.error(prog + " returned an error")
         raise SystemExit(1)
-    print "SUCCESS: " + prog
 
 class Ns3DoxygenContext(Context.Context):
     """do a full build, generate the introspected doxygen and then the doxygen"""
@@ -1112,6 +1112,7 @@
         if subprocess.Popen(["make", "SPHINXOPTS=-N", "-k",
                              "html", "singlehtml", "latexpdf" ],
                             cwd=path).wait() :
+            Logs.error("Sphinx build of " + path + " returned an error.")
             raise SystemExit(1)
 
     def execute(self):