r779 - trunk/scripts

lizardo at linuxfromscratch.org lizardo at linuxfromscratch.org
Wed Jul 14 16:40:18 PDT 2004


Author: lizardo
Date: 2004-07-14 17:40:16 -0600 (Wed, 14 Jul 2004)
New Revision: 779

Modified:
   trunk/scripts/update-website.sh
Log:
Updated update-website.sh for Subversion (and testing commit)


Modified: trunk/scripts/update-website.sh
===================================================================
--- trunk/scripts/update-website.sh	2004-07-14 05:50:00 UTC (rev 778)
+++ trunk/scripts/update-website.sh	2004-07-14 23:40:16 UTC (rev 779)
@@ -1,12 +1,10 @@
 #!/bin/bash
-# 
 #set -x
 
 ##########################################################
 # Ensure there's only 1 instance of this script running  #
 
 LOCKFILE="/tmp/update-website-in-progress"
-CVSCLEANLOCK="/tmp/cvs_being_cleaned.lock"
 
 while [ -f $LOCKFILE ]; do
         echo "Lock file present, sleeping for 5 secs and trying again"
@@ -15,11 +13,6 @@
 
 touch $LOCKFILE
 
-while [ -f $CVSCLEANLOCK ]; do
-        echo "CVS being cleaned, sleeping for 5 secs and trying again"
-        sleep 5
-done
-
 ##########################################
 # Set variables, create working dirs     #
 
@@ -27,24 +20,21 @@
 SVN="svn://svn.linuxfromscratch.org"
 
 # Temporary dir for assembling the site
-TMPDIR=`mktemp -d` && cd $TMPDIR
-cvs -Q export -D now www
-mv www NEWSITE && NEWSITE="$TMPDIR/NEWSITE"
+TMPDIR=`mktemp -d` || exit 1
 
+NEWSITE="$TMPDIR/NEWSITE"
+svn -q export $SVN/www/trunk $NEWSITE
+
 TMPCVS="$TMPDIR/TMPCVS"
 mkdir $TMPCVS
 cd $TMPCVS
 
 cvs -Q co BLFS/BOOK && export BLFS="$TMPCVS/BLFS/BOOK"
-cvs -Q co hints && export HINTS="$TMPCVS/hints"
-cvs -Q co patches && export PATCHES="$TMPCVS/patches"
-cvs -Q co www && export WWW="$TMPCVS/www"
 
 SCRIPTS="$NEWSITE/scripts"
 CL2HTML="$SCRIPTS/cl2html.pl"
 MANAGE_NEWS="$SCRIPTS/manage_news.pl"
 SVN2HTML="$SCRIPTS/svn2html.pl"
-SVN2HTML2="$SCRIPTS/svn2html2.pl"
 SVNLOG="svn log --verbose --xml"
 TEMPLATES="$NEWSITE/templates"
 YEAR=`date +%Y`
@@ -52,7 +42,7 @@
 ##############################################
 # Generate all changelogs for the news pages #
 
-for i in "$BLFS/" "$HINTS/" "$PATCHES/" "$WWW"
+for i in "$BLFS/"
 	do cd $i
 	$SCRIPTS/cvs2cl.pl -P -U $WWW/usermap --xml -l "-d'1 month ago<today'"
 done
@@ -73,21 +63,13 @@
 
 # Website.html
 cp $TEMPLATES/website-top.html website.html
-if [ -f $WWW/ChangeLog ]; then
-    $CL2HTML --infile $WWW/ChangeLog >> website.html
-else
-    echo "<p>No changes were made recently.</p>" >> website.html
-fi
+$SVNLOG $SVN/www 2>/dev/null | $SVN2HTML --with-branchname >> website.html
 cat $TEMPLATES/website-bottom.html >> website.html 
 
 # Patches/news.html
 cd $NEWSITE/patches
 cp $TEMPLATES/patches/news-top.html news.html
-if [ -f $PATCHES/ChangeLog ]; then
-    $CL2HTML --infile $PATCHES/ChangeLog >> news.html
-else
-    echo "<p>No changes were made recently.</p>" >> news.html
-fi
+$SVNLOG $SVN/patches 2>/dev/null | $SVN2HTML --with-branchname >> news.html
 cat $TEMPLATES/patches/news-bottom.html >> news.html
 
 # LFS/news.html
@@ -113,11 +95,7 @@
 # Hints/news.html
 cd $NEWSITE/hints
 cp $TEMPLATES/hints/news-top.html news.html
-if [ -f $HINTS/ChangeLog ]; then
-    $CL2HTML --with-filename --infile $HINTS/ChangeLog >> news.html
-else
-    echo "<p>No changes were made recently.</p>" >> news.html
-fi
+$SVNLOG $SVN/hints 2>/dev/null | $SVN2HTML --with-branchname >> news.html
 cat $TEMPLATES/hints/news-bottom.html >> news.html
 
 # ALFS/news.html
@@ -125,7 +103,7 @@
 cp $TEMPLATES/alfs/news-top.html news.html
 $MANAGE_NEWS -i news-$YEAR.txt >> news.html
 $MANAGE_NEWS -i ../news-$YEAR.txt >> news.html
-$SVN2HTML2 --project ALFS --with-branchname >> news.html
+$SVNLOG $SVN/ALFS 2>/dev/null | $SVN2HTML --with-branchname >> news.html
 cat $TEMPLATES/alfs/news-bottom.html >> news.html
 
 ##########################################
@@ -159,12 +137,11 @@
 # Add all other content 
 
 # Fetch latest versions from patches 
-cd $NEWSITE/patches/ &&
-cvs -Q export -D now patches && mv patches downloads
+svn -q export $SVN/patches/trunk $NEWSITE/patches/downloads
 
 # Fetch current hints and create the hints tarball
 mkdir -p $NEWSITE/hints/downloads/
-cd $NEWSITE/hints/downloads/ && cvs -Q export -D now hints
+cd $NEWSITE/hints/downloads/ && svn -q export $SVN/hints/trunk hints
 tar cjf hints.tar.bz2 hints/
 mv hints/ATTACHMENTS attachments
 mv hints/ files/




More information about the website mailing list