#!/bin/sh
# $Id:
# $URL:
#dest=../test
dest=..
lname=pages.list
dopage() {
echo "$1"
if [ "$2x" == "xmlx" ]; then
if ! [ -d $dest/$1 ]; then
mkdir $dest/$1
fi
m4 -D_xml $1.m4 | tidy -i -xml >$dest/$1/index.xml
elif [ "$2x" == "htmlx" ]; then
m4 $1.m4 | tidy -i >$dest/$1.html
elif [ "$2x" == "cssx" ]; then
m4 -D_css $1.m4 >/var/www/share/css/$1.css
else
echo "Whoops $1 $2"
fi
}
if [ -f $lname ]; then
list=`cat $lname | grep -v '#' | awk '{print $1}' | tr '\n' ' '`
for argv in $list ; do
page=""; fmt=""
page=`echo $argv | awk -F "," '{print $1}'`
fmt=`echo $argv | awk -F "," '{print $2}'`
dopage ${page} ${fmt}
done
fi
# http://www.crystalfaeries.net/linux/bin/docbookxml2html
syntax highlighted by Code2HTML, v. 0.9.1