r458 - scripts/trunk

lizardo at linuxfromscratch.org lizardo at linuxfromscratch.org
Wed Jul 13 16:41:10 PDT 2005


Author: lizardo
Date: 2005-07-13 17:41:10 -0600 (Wed, 13 Jul 2005)
New Revision: 458

Modified:
   scripts/trunk/swishcgi.conf
   scripts/trunk/update-website.mk
Log:
Enabled on-commit update for swish-e config file and template.


Modified: scripts/trunk/swishcgi.conf
===================================================================
--- scripts/trunk/swishcgi.conf	2005-07-13 23:15:46 UTC (rev 457)
+++ scripts/trunk/swishcgi.conf	2005-07-13 23:41:10 UTC (rev 458)
@@ -1,8 +1,8 @@
 # Configurarion file for http://search.linuxfromscratch.org/index.cgi
 
-$mailing_lists = ##mlists##; # This tag is replaced by the mailing lists' names
-			     # from the mailinglists file upon commit
-
+# The tag below is replaced with the lists' names from "mailinglists" file upon
+# commit
+$mailing_lists = [qw/ %%mlists%% /];
 @indexes = map("$_.swish", @$mailing_lists);
 return {
     max_query_length => 512,

Modified: scripts/trunk/update-website.mk
===================================================================
--- scripts/trunk/update-website.mk	2005-07-13 23:15:46 UTC (rev 457)
+++ scripts/trunk/update-website.mk	2005-07-13 23:41:10 UTC (rev 458)
@@ -128,18 +128,25 @@
 hints-list:
 	cd hints && $(SCRIPTS)/genlist.sh
 
-# Copy error pages to Apache's error directory
+# Apache's error pages
 error-pages: /home/httpd/error/403.html /home/httpd/error/404.html
 
 /home/httpd/error/40%.html: 40%.html
 	mv -f $@ $@.old
 	cp -p $< $@
 
-# Copy Swish-e template
-/home/httpd/search.linuxfromscratch.org/swish.tmpl: $(TEMPLATES)/swish.tmpl
+LFS_SEARCH = /home/httpd/search.linuxfromscratch.org
+# swish-e template
+$(LFS_SEARCH)/swish.tmpl: $(TEMPLATES)/swish.tmpl
 	mv -f $@ $@.old
 	cp -p $< $@
 
+# swishcgi config file
+$(LFS_SEARCH)/.swishcgi.conf: $(SCRIPTS)/swishcgi.conf $(SCRIPTS)/mailinglists
+	mv -f $@ $@.old
+	ml=`egrep -v '^[ \t]*#' $(SCRIPTS)/mailinglists | tr '\n' ' '`; \
+	sed s/%%mlists%%/$$ml/g $< > $(LFS_SEARCH)/.swishcgi.conf
+
 # Validate XHTML files
 # FIXME: better on a pre-commit script?
 #validate:




More information about the website mailing list