[Swift-commit] r3790 - www

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Dec 13 16:15:46 CST 2010


Author: wozniak
Date: 2010-12-13 16:15:46 -0600 (Mon, 13 Dec 2010)
New Revision: 3790

Modified:
   www/update.sh
Log:
Fix perms, automate docbook and fop links, improve naming


Modified: www/update.sh
===================================================================
--- www/update.sh	2010-12-13 22:15:02 UTC (rev 3789)
+++ www/update.sh	2010-12-13 22:15:46 UTC (rev 3790)
@@ -1,21 +1,31 @@
 #!/bin/sh
 
-update_docs()
+crash()
 {
+  echo $1
+  exit 1
+}
+
+update_guide()
+{
   DIR=$1
-  echo "--------- Updating docs: ${DIR} ----------"
-  pushd ${DIR}
+  echo "--------- Updating guide: ${DIR} ----------"
+  pushd ${DIR} || crash "Could not enter: ${DIR}"
+  [[ ! -d formatting/docbook ]] && \
+    ln -s ../formatting/docbook formatting/docbook
+  [[ ! -d formatting/fop ]]&& \
+    ln -s ../../fop formatting/fop
   svn update
   chmod -R g+w .svn 2>/dev/null
   chmod -R g+w formatting/.svn 2>/dev/null
-  chmod a+rx . userguide
+  ./buildguides.sh
   pushd userguide
   chmod a+r *.php *.jpeg *.png
-  popd
-  ./buildguides.sh
   chmod g+w *.php
   chmod g+w *.pdf
+  popd
   chmod -R g+w userguide
+  chmod a+rx userguide
   popd
   return 0
 }
@@ -29,7 +39,7 @@
 
 for SET in guides/trunk guides/release-0.91
 do
-  update_docs ${SET}
+  update_guide ${SET}
 done
 
 echo "---------     All done     ----------"




More information about the Swift-commit mailing list