[Swift-commit] r5458 - in branches/release-0.93/docs: . siteguide

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Wed Dec 21 17:05:40 CST 2011


Author: ketan
Date: 2011-12-21 17:05:40 -0600 (Wed, 21 Dec 2011)
New Revision: 5458

Modified:
   branches/release-0.93/docs/build_docs.sh
   branches/release-0.93/docs/siteguide/beagle
Log:
build doc caching

Modified: branches/release-0.93/docs/build_docs.sh
===================================================================
--- branches/release-0.93/docs/build_docs.sh	2011-12-21 16:52:08 UTC (rev 5457)
+++ branches/release-0.93/docs/build_docs.sh	2011-12-21 23:05:40 UTC (rev 5458)
@@ -40,17 +40,36 @@
 do
    pushd $directory > /dev/null 2>&1
    FILES=`ls -1 *.txt 2>/dev/null`
+   CONTENTFILES=`/bin/ls -l | grep ^- | awk '{print $9}' | grep -v "\."`
+   
    for file in $FILES
    do
+      doflag=0
+      for contentfile in $CONTENTFILES
+      do
+         diff $contentfile .cache/$contentfile >/dev/null 2>/dev/null
+         if [ $? -ne 0 ]
+         then
+          doflag=1
+         fi
+       done
       #diff $file .cache/$file >/dev/null 2>/dev/null
       #if [ $? -ne 0 ]
       #then
       # echo "updating cache"
       # cp $file .cache
-       echo Converting $directory"$file" to HTML
-       asciidoc -a toc -a max-width=750px -a stylesheet=$(pwd)/../stylesheets/asciidoc.css $file
-       echo Converting $directory"$file" to PDF
-       a2x --format=pdf --no-xmllint $file
+       if [ $doflag -eq 1 ]
+       then
+        echo "updating cache"
+        for newcontent in $CONTENTFILES
+        do
+          cp $newcontent .cache/
+        done
+        echo Converting $directory"$file" to HTML
+        asciidoc -a toc -a max-width=750px -a stylesheet=$(pwd)/../stylesheets/asciidoc.css $file
+        echo Converting $directory"$file" to PDF
+        a2x --format=pdf --no-xmllint $file
+      fi
       #fi 
    done
 

Modified: branches/release-0.93/docs/siteguide/beagle
===================================================================
--- branches/release-0.93/docs/siteguide/beagle	2011-12-21 16:52:08 UTC (rev 5457)
+++ branches/release-0.93/docs/siteguide/beagle	2011-12-21 23:05:40 UTC (rev 5458)
@@ -225,7 +225,7 @@
 SWIFT_HEAP_MAX=5000M swift -config cf -tc.file tc -sites.file sites.xml catsn.swift -n=10000
 -----
 
-* Application invocation fails. An application invocation might fail for a variety of reasons. Some of the common reasons include a faulty command line, out-of-memory, non-availability of data, library dependencies unmet, among others. In another set of failures, the application invocation might fail for a partial number of datasets. In these conditions, one might want to to continue for the rest of application invocations. In most cases, these conditions could be handled by catching various exitcodes and logging the erroneous invocations for later inspection. In the rest of this section, we provide some such examples.
+* Application invocation fails or application returns a non-zero exit status. An application invocation might fail for a variety of reasons. Some of the common reasons include a faulty command line, out-of-memory, non-availability of data, library dependencies unmet, among others. In another set of failures, the application invocation might fail for a partial number of datasets. In these conditions, one might want to to continue for the rest of application invocations. In most cases, these conditions could be handled by catching various exitcodes and logging the erroneous invocations for later inspection. In the rest of this section, we provide some such examples.
  - Handling exitcodes in wrapperscript. The following code snippet from an application, handles the erroneous exitcode so that the erroneous runs could be logged and dealt with later:
 
 ----




More information about the Swift-commit mailing list