1 if [ -z "$SGML_CATALOG_FILES"]
3 if [ ! -f "$FPTOOLS_CATALOG_FILE" ]
5 echo "CATALOG file not set up; see installation guide for details."
8 SGML_CATALOG_FILES=$FPTOOLS_CATALOG_FILE
11 HTML_STYLESHEET=$HTML_DIR/html/docbook.css
12 ADMON_GRAPHICS=$HTML_DIR/html/images/*.gif
15 TMPDIR=DBTOHTML_OUTPUT_DIR$$
17 echo TMPDIR is $TMPDIR
19 # Dave Mason's option to specify a different stylesheet
26 echo "Using stylesheet: \"${DB_STYLESHEET}\""
30 echo "Usage: `basename $0` [filename.sgml]" >&2
38 echo Cannot read \"$1\". Exiting. >&2
41 if echo $1 | egrep -i '\.sgml$|\.sgm$' >/dev/null 2>&1
43 # now make sure that the output directory is always a subdirectory
44 # of hte current directory
46 input_file=`basename $1`
47 output="`echo $input_file | sed 's,\.sgml$,,;s,\.sgm$,,'`"
48 echo "input file was called $input_file -- output will be in $output"
53 # we used to generate a single file, but with the modular DB_STYLESHEETs
54 # it's best to make a new directory with several html files in it
55 #cat $* | jade -d $DB_STYLESHEET -t sgml -V nochunks > $TMPFN
59 if [ $1 = `basename $1` ]; then
60 echo "working on ../$1"
61 (cd $TMPDIR; $JADE -t sgml -ihtml -d ${DB_STYLESHEET}\#html -c $SGML_CATALOG_FILES ../$1; cd $SAVE_PWD)
64 (cd $TMPDIR; $JADE -t sgml -ihtml -d ${DB_STYLESHEET}\#html -c $SGML_CATALOG_FILES $1; cd $SAVE_PWD)
69 if [ -d ${output}.junk ]
71 /bin/rm -rf ${output}.junk
75 mv $output ${output}.junk
77 echo "about to copy cascading stylesheet and admon graphics to temp dir"
78 cp ${HTML_STYLESHEET} ${TMPDIR}/
79 mkdir ${TMPDIR}/stylesheet-images
80 cp ${ADMON_GRAPHICS} ${TMPDIR}/stylesheet-images
81 echo "about to rename temporary directory to $output"