3 DB_STYLESHEET=/usr/lib/sgml/stylesheets/cygnus-both.dsl
4 HTML_STYLESHEET=/usr/lib/sgml/stylesheets/nwalsh-modular/test/docbook.css
5 ADMON_GRAPHICS=/usr/lib/sgml/stylesheets/nwalsh-modular/images/*.gif
8 TMPDIR=DBTOHTML_OUTPUT_DIR$$
10 echo TMPDIR is $TMPDIR
12 # Dave Mason's option to specify a different stylesheet
19 echo "Using stylesheet: \"${DB_STYLESHEET}\""
23 echo "Usage: `basename $0` [filename.sgml]" >&2
31 echo Cannot read \"$1\". Exiting. >&2
34 if echo $1 | egrep -i '\.sgml$|\.sgm$' >/dev/null 2>&1
36 # now make sure that the output directory is always a subdirectory
37 # of hte current directory
39 input_file=`basename $1`
40 output="`echo $input_file | sed 's,\.sgml$,,;s,\.sgm$,,'`"
41 echo "input file was called $input_file -- output will be in $output"
46 # we used to generate a single file, but with the modular DB_STYLESHEETs
47 # it's best to make a new directory with several html files in it
48 #cat $* | jade -d $DB_STYLESHEET -t sgml -V nochunks > $TMPFN
52 if [ $1 = `basename $1` ]; then
53 echo "working on ../$1"
54 (cd $TMPDIR; jade -t sgml -ihtml -d ${DB_STYLESHEET}\#html ../$1; cd $SAVE_PWD)
57 (cd $TMPDIR; jade -t sgml -ihtml -d ${DB_STYLESHEET}\#html $1; cd $SAVE_PWD)
62 if [ -d ${output}.junk ]
64 /bin/rm -rf ${output}.junk
68 mv $output ${output}.junk
70 echo "about to copy cascading stylesheet and admon graphics to temp dir"
71 cp ${HTML_STYLESHEET} ${TMPDIR}/
72 mkdir ${TMPDIR}/stylesheet-images
73 cp ${ADMON_GRAPHICS} ${TMPDIR}/stylesheet-images
74 echo "about to rename temporary directory to $output"