[Swift-commit] r5453 - branches/release-0.93/docs

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Tue Dec 20 16:33:01 CST 2011


Author: ketan
Date: 2011-12-20 16:33:01 -0600 (Tue, 20 Dec 2011)
New Revision: 5453

Modified:
   branches/release-0.93/docs/build_docs.sh
Log:
implemented a simple caching scheme that skips the processing of files that are not changed

Modified: branches/release-0.93/docs/build_docs.sh
===================================================================
--- branches/release-0.93/docs/build_docs.sh	2011-12-20 22:06:23 UTC (rev 5452)
+++ branches/release-0.93/docs/build_docs.sh	2011-12-20 22:33:01 UTC (rev 5453)
@@ -42,10 +42,16 @@
    FILES=`ls -1 *.txt 2>/dev/null`
    for file in $FILES
    do
-      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 
+      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
+      fi 
    done
 
    if [ ! -d "$INSTALLATION_DIRECTORY/$VERSION" ]; then




More information about the Swift-commit mailing list