r311 - scripts/trunk

lizardo at linuxfromscratch.org lizardo at linuxfromscratch.org
Sun Jun 19 08:46:49 PDT 2005


Author: lizardo
Date: 2005-06-19 09:46:49 -0600 (Sun, 19 Jun 2005)
New Revision: 311

Modified:
   scripts/trunk/update-website.mk
Log:
First attempt to improve update-website.mk's performance: reduce the number of commands run per project.


Modified: scripts/trunk/update-website.mk
===================================================================
--- scripts/trunk/update-website.mk	2005-06-18 19:42:25 UTC (rev 310)
+++ scripts/trunk/update-website.mk	2005-06-19 15:46:49 UTC (rev 311)
@@ -54,22 +54,19 @@
 	mkdir -p $(WWW_WC)/hints/downloads/files
 	svn -q checkout $(SVN)/hints/trunk $(WWW_WC)/hints/downloads/files
 	ln -s files/ATTACHMENTS $(WWW_WC)/hints/downloads/attachments
+	mkdir -p $(WWW_WC)/logs
 
 svnlog-%:
-	mkdir -p logs
-	$(SVNLOG) $(SVN)/$* 2>/dev/null | $(SVN2HTML) --with-branchname > logs/$*.html.tmp
-	cmp -s logs/$*.html.tmp logs/$*.html || cp logs/$*.html.tmp logs/$*.html
-	rm logs/$*.html.tmp
+	$(SVNLOG) $(SVN)/$* 2>/dev/null | $(SVN2HTML) --with-branchname > logs/$*.html
 
 svnlog2-%:
-	mkdir -p logs
-	$(SVN2HTML2) --project $* --with-branchname > logs/$*.html.tmp
-	cmp -s logs/$*.html.tmp logs/$*.html || cp logs/$*.html.tmp logs/$*.html
-	rm logs/$*.html.tmp
+	$(SVN2HTML2) --project $* --with-branchname > logs/$*.html
 
 ###########################################
 # Update project-specific website sections
 #
+# Place here any commands to be run on post-commit for each project.
+#
 # TODO: These rules should be run by each project's post-commit script or by
 # cron jobs
 
@@ -114,6 +111,7 @@
 
 update-www: svnlog-www2 #error-pages
 	svn -q update . -r $(REV)
+	svn -q update $(SCRIPTS) -r $(REV)
 
 fetch-hints:
 	find hints/downloads/files/ -type l -exec rm '{}' \;
@@ -126,9 +124,13 @@
 
 hints-symlinks:
 	cd hints/downloads/files && \
-	if [ -d HOLD ]; then for i in $$(ls HOLD/*.txt); do ln -s $$i; done; fi
+	if [ -d HOLD ]; then \
+		for i in $$(ls HOLD/*.txt); do ln -s $$i; done; \
+	fi
 	cd hints/downloads/files && \
-	for i in $$(ls PREVIOUS_FORMAT/*.txt); do ln -s $$i; done
+	if [ -d PREVIOUS_FORMAT ]; then \
+		for i in $$(ls PREVIOUS_FORMAT/*.txt); do ln -s $$i; done; \
+	fi
 
 hints-list:
 	#cd hints && $(SCRIPTS)/genlist.sh
@@ -138,6 +140,7 @@
 # TODO: validation not possible with SSI? We should find a way to validate
 # the HTML code, though.
 validate:
+	true
 #	test -n "$(TARGETDIR)"
 #	cd $(TARGETDIR) && \
 #	find -name \*.html -maxdepth 3 | while read file; do \




More information about the website mailing list