5 echo "Usage: `basename $0` [filename.sgml]" >&2
9 output="`echo $1 | sed 's,\.sgml$,.ps,;s,\.sgm$,.ps,'`"
10 outdvi="`echo $1 | sed 's,\.sgml$,.dvi,;s,\.sgm$,.dvi,'`"
12 dvips $outdvi -o $output
14 # SUP: What's this stuff below???
21 echo Cannot read \"$1\". Exiting. >&2
24 if echo $1 | egrep -i '\.sgml$|\.sgm$' >/dev/null 2>&1
26 output="`echo $1 | sed 's,\.sgml$,.ps,;s,\.sgm$,.ps,'`"
27 outdvi="`echo $1 | sed 's,\.sgml$,.dvi,;s,\.sgm$,.dvi,'`"
28 # if we have a filename argument let us improve the
29 # temporary filename, sine gv and ghostview will display it.
30 # this TMPFN has $1 embedded in it
31 TMPFN=`echo $1 | sed 's/\.sgml//'`_db2pstmp$$
37 if [ ! -f ${TMPFN}.dvi ]
42 dvips $outdvi -o $output
50 mv ${TMPFN}.ps $output
52 mv ${TMPFN}.ps db2ps.ps