LP #791225: Touch custom files at install time, avoid 404s in error logs collab/senator/touch-custom-files
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 23 Oct 2012 17:43:27 +0000 (13:43 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 23 Oct 2012 20:08:37 +0000 (16:08 -0400)
It is needlessly confusing to admins, especially newcomers to Evergreen,
to encounter all the file-not-found errors in the Apache logs that are
generated only because custom CSS files are not touched by default.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/web/Makefile.am

index 4b7a76a..e2464ef 100644 (file)
@@ -10,8 +10,20 @@ jsdojoosrfdir = $(DESTDIR)$(WEBDIR)/js/dojo/opensrf
 opacextrasdir = $(DESTDIR)$(WEBDIR)/opac/extras/xsl/
 reportsdir = $(WEBDIR)/reports/
 
+# Add files to this list if you want them to be automatically touched at
+# installation time. This avoids 404s in Apache logs, which bother some admins.
+CUSTOM_TOUCHABLES = $(WEBDIR)/css/skin/default/register_custom.css \
+            $(WEBDIR)/xul/server/skin/global_custom.css \
+            $(WEBDIR)/xul/server/skin/simple_auth_custom.css \
+            $(WEBDIR)/xul/server/skin/cat_custom.css \
+            $(WEBDIR)/xul/server/skin/patron_display_custom.css \
+            $(WEBDIR)/xul/server/skin/patron_summary_custom.css \
+            $(WEBDIR)/xul/server/skin/circ_custom.css \
+            $(WEBDIR)/css/opac_marc.css \
+            $(WEBDIR)/css/theme/default/vandelay.css
+
 if BUILDILSWEB
-OILSWEB_INST = webcore-install offline-install
+OILSWEB_INST = webcore-install offline-install touch-custom-files
 
 #webcore-install
 
@@ -31,7 +43,7 @@ JSDOJOSRF = $(OPENSRF_LIBS)/javascript/md5.js \
             $(OPENSRF_LIBS)/javascript/opensrf_xmpp.js
 endif
 
-install-exec-local: webcore-install offline-install
+install-exec-local: webcore-install offline-install touch-custom-files
 
 uninstall-hook:
        rm -R $(opacextrasdir)
@@ -62,6 +74,10 @@ offline-install:
        cp $(TMP)/offline.pl $(DESTDIR)$(CGIDIR)/offline/
        chmod +x $(DESTDIR)$(CGIDIR)/offline/offline.pl
 
+touch-custom-files:
+       @echo Touching custom CSS files
+       for file in $(CUSTOM_TOUCHABLES); do [ -f "$$file" ] || touch $$file; done
+
 install-data-local:
        $(MKDIR_P) $(DESTDIR)$(WEBDIR)/opac/common/js
        for i in $(OPACJS); do \