4 if [ ! -f "$DOCBOOK_CATALOG" ] ; then
5 echo "CATALOG file not set up; see installation guide for details."
9 HTML_STYLESHEET=$HTML_DIR/html/docbook.css
10 ADMON_GRAPHICS=$HTML_DIR/html/images/*.gif
13 TMPDIR=DBTOHTML_OUTPUT_DIR$$
15 echo TMPDIR is $TMPDIR
17 # Dave Mason's option to specify a different stylesheet
24 echo "Using stylesheet: \"${DB_STYLESHEET}\""
28 echo "Usage: `basename $0` [filename.sgml]" >&2
36 echo Cannot read \"$1\". Exiting. >&2
39 if echo $1 | egrep -i '\.sgml$|\.sgm$' >/dev/null 2>&1
41 # now make sure that the output directory is always a subdirectory
42 # of hte current directory
44 input_file=`basename $1`
45 output="`echo $input_file | sed 's,\.sgml$,,;s,\.sgm$,,'`"
46 echo "input file was called $input_file -- output will be in $output"
51 # we used to generate a single file, but with the modular DB_STYLESHEETs
52 # it's best to make a new directory with several html files in it
53 #cat $* | jade -d $DB_STYLESHEET -t sgml -V nochunks > $TMPFN
57 if [ $1 = `basename $1` ]; then
58 echo "working on ../$1"
59 (cd $TMPDIR; $JADE -t sgml -ihtml -d ${DB_STYLESHEET}\#html -c $DOCBOOK_CATALOG ../$1; cd $SAVE_PWD)
62 (cd $TMPDIR; $JADE -t sgml -ihtml -d ${DB_STYLESHEET}\#html -c $DOCBOOK_CATALOG $1; cd $SAVE_PWD)
67 if [ -d ${output}.junk ]
69 /bin/rm -rf ${output}.junk
73 mv $output ${output}.junk
75 echo "about to copy cascading stylesheet and admon graphics to temp dir"
76 cp ${HTML_STYLESHEET} ${TMPDIR}/
77 mkdir ${TMPDIR}/stylesheet-images
78 cp ${ADMON_GRAPHICS} ${TMPDIR}/stylesheet-images
79 echo "about to rename temporary directory to $output"