r940 - html/trunk/scripts

lizardo at linuxfromscratch.org lizardo at linuxfromscratch.org
Wed Jan 12 15:27:12 PST 2005


Author: lizardo
Date: 2005-01-12 16:27:10 -0700 (Wed, 12 Jan 2005)
New Revision: 940

Modified:
   html/trunk/scripts/update-website.mk
Log:
Adapted update-website.mk to test "local rsync" solution (see http://archive.linuxfromscratch.org/mail-archives/website/2004-November/004112.html).


Modified: html/trunk/scripts/update-website.mk
===================================================================
--- html/trunk/scripts/update-website.mk	2005-01-12 22:42:38 UTC (rev 939)
+++ html/trunk/scripts/update-website.mk	2005-01-12 23:27:10 UTC (rev 940)
@@ -3,9 +3,9 @@
 # Usage: first run
 #
 #	umask 002 &&
-#	./update-website.mk TARGETDIR="<target_dir>" svn-checkout
+#	./update-website.mk WWW_WC="<target_dir>" svn-checkout
 #
-# to create an initial repository on TARGETDIR, if it does not exist yet. To
+# to create an initial repository on WWW_WC, if it does not exist yet. To
 # update the website manually (usually this will be done by a post-commit hook
 # script) run
 #
@@ -17,13 +17,15 @@
 SVN = svn://svn.linuxfromscratch.org
 REV = HEAD
 
-# Assuming we are already on TARGETDIR
-TARGETDIR = $(PWD)
+# Website working copy location
+# Note: the working copy below should not be manipulated directly!
+# Assuming we are already on WWW_WC
+WWW_WC = $(PWD)
 
-# Mirrors to which the website will be pushed through rsync
-#MIRRORS = jenacon.net
+# Website location (defined on the Subversion hook script)
+#TARGETDIR = /home/httpd/test.linuxfromscratch.org
 
-SCRIPTS = $(TARGETDIR)/scripts
+SCRIPTS = $(WWW_WC)/scripts
 # "LC_ALL=C" garantees a sane localization setting
 MANAGE_NEWS = LC_ALL=C $(SCRIPTS)/manage_news.pl
 SVN2HTML = $(SCRIPTS)/svn2html.pl
@@ -51,26 +53,26 @@
 news-rss: alfs/feed.rss blfs/feed.rss hlfs/feed.rss lfs/feed.rss
 
 backup:
-	tar -cPf /var/tmp/website-backup.tar $(TARGETDIR)
+	tar -cPf /var/tmp/website-backup.tar $(WWW_WC)
 
 # Useful for the initial repository setup
 svn-checkout:
 # The setgid bit on dirs forces all files under it to have the same group of
-# TARGETDIR
-	install -g lfswww -m 2775 -d $(TARGETDIR)
-	svn -q checkout $(SVN)/www/html/trunk $(TARGETDIR)
-	mkdir -p $(TARGETDIR)/patches/downloads
-	svn -q checkout $(SVN)/patches/trunk $(TARGETDIR)/patches/downloads
-	mkdir -p $(TARGETDIR)/hints/downloads/files
-	svn -q checkout $(SVN)/hints/trunk $(TARGETDIR)/hints/downloads/files
-	ln -s files/ATTACHMENTS $(TARGETDIR)/hints/downloads/attachments
+# WWW_WC
+	install -g lfswww -m 2775 -d $(WWW_WC)
+	svn -q checkout $(SVN)/www/html/trunk $(WWW_WC)
+	mkdir -p $(WWW_WC)/patches/downloads
+	svn -q checkout $(SVN)/patches/trunk $(WWW_WC)/patches/downloads
+	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
 # Add some compatibility symlinks
-	ln -s lfs/view $(TARGETDIR)
-	ln -s images/favicon.ico $(TARGETDIR)
-	ln -s 2columns.css $(TARGETDIR)/style/screen.css
+	ln -s lfs/view $(WWW_WC)
+	ln -s images/favicon.ico $(WWW_WC)
+	ln -s 2columns.css $(WWW_WC)/style/screen.css
 
 svn-update:
-	svn -q update $(TARGETDIR) -r $(REV)
+	svn -q update $(WWW_WC) -r $(REV)
 
 # Generate news archives
 define gen_news_targets
@@ -216,6 +218,5 @@
 #	cp {403,404}.html /home/httpd/error
 
 run-rsync:
-	for m in $(MIRRORS); do \
-	rsync -aq --exclude-from=scripts/rsync-ignore $(TARGETDIR)/ $$m::lfs; \
-	done
+	test -n "$(TARGETDIR)"
+	rsync -aq --exclude-from=scripts/rsync-ignore $(WWW_WC)/ $(TARGETDIR)/




More information about the website mailing list