r465 - scripts/trunk

lizardo at linuxfromscratch.org lizardo at linuxfromscratch.org
Wed Jul 13 17:31:26 PDT 2005


Author: lizardo
Date: 2005-07-13 18:31:26 -0600 (Wed, 13 Jul 2005)
New Revision: 465

Modified:
   scripts/trunk/update-website.mk
Log:
update-website.mk: "mv -f" fails when source file does not exist; fixing it.


Modified: scripts/trunk/update-website.mk
===================================================================
--- scripts/trunk/update-website.mk	2005-07-14 00:22:39 UTC (rev 464)
+++ scripts/trunk/update-website.mk	2005-07-14 00:31:26 UTC (rev 465)
@@ -134,24 +134,24 @@
 error-pages: /home/httpd/error/403.html /home/httpd/error/404.html
 
 /home/httpd/error/40%.html: 40%.html
-	mv -f $@ $@.old
+	test -e $@ && mv -f $@ $@.old
 	cp -p $< $@
 
 # swish-e template
 $(LFS_SEARCH)/swish.tmpl: $(TEMPLATES)/swish.tmpl
-	mv -f $@ $@.old
+	test -e $@ && mv -f $@ $@.old
 	cp -p $< $@
 
 # swishcgi config file
 $(LFS_SEARCH)/.swishcgi.conf: $(SCRIPTS)/swishcgi.conf $(LFS_SEARCH)/.mailinglists
-	mv -f $@ $@.old
+	test -e $@ && mv -f $@ $@.old
 	ml=`cat $(LFS_SEARCH)/.mailinglists`; \
 	sed "s/%%mlists%%/$$ml/g" $< > $(LFS_SEARCH)/.swishcgi.conf
 
 # file containing the mailing list names (used by update-search-engine.sh and by
 # the rule above)
 $(LFS_SEARCH)/.mailinglists: $(SCRIPTS)/mailinglists
-	mv -f $@ $@.old
+	test -e $@ && mv -f $@ $@.old
 	egrep -v '^[ \t]*#' $(SCRIPTS)/mailinglists | tr '\n' ' ' > \
 	$(LFS_SEARCH)/.mailinglists
 




More information about the website mailing list