[m-rev.] diff: fix bug with web site htdig index

Fergus Henderson fjh at cs.mu.OZ.AU
Mon May 13 15:18:25 AEST 2002


The htdig indexes for the web site haven't been updated
properly since Feb 25th.

Estimated hours taken: 0.5
Branches: main

w3/bin/install_webpages:
	Fix a bug: the htdig work files now live in /var/lib/htdig rather
	than /var/spool/htdig.  Also improve error reporting.

Workspace: /home/venus/fjh/ws-venus/mercury
Index: w3/bin/install_webpages
===================================================================
RCS file: /home/mercury1/repository/w3/bin/install_webpages,v
retrieving revision 1.21
diff -u -d -r1.21 install_webpages
--- w3/bin/install_webpages	19 Oct 2001 21:12:00 -0000	1.21
+++ w3/bin/install_webpages	13 May 2002 05:06:59 -0000
@@ -47,15 +47,17 @@
     #
 (
     cd mailing-lists;
-    ./rearchive
+    ./rearchive || {
+    	echo "*** rearchive failed" 1>&2
+    }
 )
 
     #
     # Install the web pages
     #
-cvs update -d .
-cvs checkout tutorial
-make install
+cvs update -d . || echo "*** cvs update failed" 1>&2
+cvs checkout tutorial || echo "*** cvs checkout failed" 1>&2
+make install || echo "*** make install failed" 1>&2
 
     #
     # Reindex the web site for searching.
@@ -64,14 +66,27 @@
 umask 002
 
     # Index the web-site for searching.
-htdig -c /etc/htdig/htdig-mercury.conf -a -i || exit 1
-htmerge -c /etc/htdig/htdig-mercury.conf -a || exit 1
+htdig -c /etc/htdig/htdig-mercury.conf -a -i || {
+	echo "*** htdig failed" 1>&2
+	exit 1
+}
+htmerge -c /etc/htdig/htdig-mercury.conf -a || {
+	echo "*** htmerge failed" 1>&2
+	exit 1
+}
 
     # Replace the work files with their alternate versions.
-cd /var/spool/htdig
+cd /var/lib/htdig || {
+	echo "*** can't cd to /var/lib/htdig" 1>&2
+	exit 1
+}
 for file in `ls *.work`
 do
-    mv $file `basename $file .work`
+    mv $file `basename $file .work` || {
+	echo "*** mv failed" 1>&2
+	exit 1
+    }
+}
 done
 
 echo Install finished at `date`

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list