Andrew Benton wrote:
> On Tue, 10 Apr 2012 16:00:35 +0100
> Ken Moffat <[email protected]> wrote:
> 
>>  More generally, if we could agree on when the significant
>> milestones in the book were, then we could pull out the revisions.
>> But I don't hold out much hope that we *can* agree :)
> 
> Indeed. And I don't think a discussion around when would be the right
> time to make a snapshot would be very productive. A regular automatic
> cron job that happened every 6 months would be some work (for Bruce ;)
> to set up initially but would hopefully be low maintenance in the long
> term.

The nice thing about svn is that you can get any version of the book that you 
want:

#!/bin/bash
umask 022

XML_DIR=`mktemp -d /tmp/blfsbookxml.XXXXXX`
BUILD_DIR=`mktemp -d /tmp/blfsbookbuild.XXXXXX`
BLFS_DIR=$XML_DIR/BLFS/
BOOK_DIR=$BLFS_DIR/BOOK

SVN="svn://linuxfromscratch.org/BLFS/trunk"

[ ! -d $XML_DIR   ] && mkdir -p $XML_DIR
[ ! -d $BUILD_DIR ] && mkdir -p $BUILD_DIR

cd $XML_DIR
REVISON=8123  # Can also be a date '{2011-02-17}' or 'HEAD'
svn --quiet export --revision $REVISION "$SVN" BLFS # Change revision as req

cd $BOOK_DIR
xsltproc --xinclude                          \
          --nonet                             \
          -stringparam base.dir ${BUILD_DIR}/ \
          -stringparam chunk.quietly 1        \
          stylesheets/blfs-chunked.xsl        \
          index.xml

mkdir -p ${BUILD_DIR}/stylesheets  ${BUILD_DIR}/images
cp stylesheets/lfs-xsl/*.css ${BUILD_DIR}/stylesheets
cp images/*.png              ${BUILD_DIR}/images

sed -i -e "s@../stylesheets@stylesheets@g"  ${BUILD_DIR}/*.html
sed -i -e "s@../images@images@g"            ${BUILD_DIR}/*.html

for filename in `find $BUILD_DIR -name "*.html"`; do
    tidy -config tidy.conf $filename
    sh obfuscate.sh $filename
    sed -i -e "s@text/html@application/xhtml+xml@g" $filename
done

cd $BUILD_DIR
tar -cjhf blfs-book-svn-html-$REVISION.tar.bz2 *
-------------

Building the bootscripts or placing on a server is a little more complex.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to