#!/bin/bash
# making html files from WML files

export PERLLIB=`pwd`
export TOP_SRCDIR=`pwd`/../../


case "$1" in
 help|-help|--help)
	echo "$0 -f file - Make only one file, don't add a .wml to the filename"
	echo "$0 -d dir - Make only one directory"
	;;
 -f)	
	wmk -D basedir~./ -f $2.wml --include `pwd`/includes
	;;
 -d)
	clear
	echo "Generating html files from wml source"
	echo "*************************************"
	echo ""
	wmk -D basedir~`pwd`/ $2 -F includes -a --include `pwd`/includes
	echo ""
	echo "*************************************"
	;;
 *)	
	clear
	echo "Generating html files from wml source"
	echo "*************************************"
	echo ""
	wmk -F includes -a --include `pwd`/includes
	echo ""
	echo "*************************************"
	;;
esac
