3 HTML_STYLESHEET=$HTML_DIR/html/docbook.css
4 ADMON_GRAPHICS=$HTML_DIR/html/images/*.gif
7 TMPDIR=DBTOHTML_OUTPUT_DIR$$
11 # Dave Mason's option to specify a different stylesheet
18 echo "Using stylesheet: \"${DB_STYLESHEET}\""
22 echo "Usage: `basename $0` [filename.sgml]" >&2
30 echo Cannot read \"$1\". Exiting. >&2
33 if echo $1 | egrep -i '\.sgml$|\.sgm$' >/dev/null 2>&1
35 # now make sure that the output directory is always a subdirectory
36 # of hte current directory
38 input_file=`basename $1`
39 output="`echo $input_file | sed 's,\.sgml$,,;s,\.sgm$,,'`"
40 echo "input file was called $input_file -- output will be in $output"
45 # we used to generate a single file, but with the modular DB_STYLESHEETs
46 # it's best to make a new directory with several html files in it
47 #cat $* | jade -d $DB_STYLESHEET -t sgml -V nochunks > $TMPFN
51 if [ $1 = `basename $1` ]; then
52 echo "working on ../$1"
53 (cd $TMPDIR; jade -t sgml -ihtml -d ${DB_STYLESHEET}\#html ../$1; cd $SAVE_PWD)
56 (cd $TMPDIR; jade -t sgml -ihtml -d ${DB_STYLESHEET}\#html $1; cd $SAVE_PWD)
61 if [ -d ${output}.junk ]
63 /bin/rm -rf ${output}.junk
67 mv $output ${output}.junk
69 echo "about to copy cascading stylesheet and admon graphics to temp dir"
70 cp ${HTML_STYLESHEET} ${TMPDIR}/
71 mkdir ${TMPDIR}/stylesheet-images
72 cp ${ADMON_GRAPHICS} ${TMPDIR}/stylesheet-images
73 echo "about to rename temporary directory to $output"