#!/bin/bash ##### # # Parse the XML documents to create a 'package' book # # $Id$ ##### #----------------------------# generate_TARGET_xml() { # #----------------------------# : < Preface Installing $TARGET in Dependencies Build Order EOF } > $TARGET-index.xml #--------------------- # Dump $TARGET-index.xml.tmp in reverse order. tac $TARGET-index.xml.tmp >> $TARGET-index.xml rm $TARGET-index.xml.tmp #--------------------- # Footer of $TARGET-index.xml { cat << EOF EOF } >> $TARGET-index.xml echo "done" } #-------------------------# generate_target_book() { # #-------------------------# : < HTML book from <$BLFS_XML> xml files ..." xsltproc --xinclude --nonet \ --stringparam mail_server $MAIL_SERVER \ --stringparam xwindow $X11 \ --stringparam base.dir HTML/ \ ../libs/book.xsl \ $TARGET-index.xml > xsltproc.log 2>&1 mkdir HTML/{stylesheets,images} cp ../$BLFS_XML/stylesheets/*.css HTML/stylesheets cp ../$BLFS_XML/images/*.png HTML/images cd HTML sed -i -e "s@../stylesheets@stylesheets@g" *.html sed -i -e "s@../images@images@g" *.html for filename in `find . -name "*.html"` ; do tidy -config ../../$BLFS_XML/tidy.conf $filename || true sh ../../$BLFS_XML/obfuscate.sh $filename sed -i -e "s@text/html@application/xhtml+xml@g" $filename done cd .. echo "done" } #-------------------------# create_build_scripts() { # #-------------------------# : <> xsltproc.log echo -en "\n\tGenerating the build scripts ..." xsltproc --xinclude --nonet \ -o ./scripts/ ../libs/scripts.xsl \ $TARGET-index.xml >> xsltproc.log 2>&1 echo -e "done\n" # Make the scripts executable. chmod -R +x scripts }