Skip to content
Snippets Groups Projects
Commit 3052b4ff authored by Reuben Thomas's avatar Reuben Thomas
Browse files

[project @ 2000-06-26 12:48:47 by rrt]

Remove lots of junk from db2ps.sh, and make it find db2dvi properly.

(I'll merge it)
parent 2288751b
No related merge requests found
......@@ -3,6 +3,7 @@ include $(TOP)/mk/boilerplate.mk
SCRIPT_PROG=../db2ps
SCRIPT_OBJS=db2ps.sh
SCRIPT_SUBST_VARS=DOCBOOK_PREFIX
INTERP=$(SHELL)
CLEAN_FILES += $(SCRIPT_PROG)
......
TMPFN=db2pstmp$$
# Dave Mason's option to specify a different stylesheet
case $1 in
-d) DB_STYLESHEET=$2
shift 2
;;
esac
if [ $# -gt 2 ]
then
......@@ -8,54 +13,7 @@ fi
output="`echo $1 | sed 's,\.sgml$,.ps,;s,\.sgm$,.ps,'`"
outdvi="`echo $1 | sed 's,\.sgml$,.dvi,;s,\.sgm$,.dvi,'`"
db2dvi "$@"
$(DOCBOOK_PREFIX)db2dvi -d ${DB_STYLESHEET} "$@"
dvips $outdvi -o $output
# SUP: What's this stuff below???
exit 0
if [ $# -eq 1 ]
then
if [ ! -r $1 ]
then
echo Cannot read \"$1\". Exiting. >&2
exit 1
fi
if echo $1 | egrep -i '\.sgml$|\.sgm$' >/dev/null 2>&1
then
output="`echo $1 | sed 's,\.sgml$,.ps,;s,\.sgm$,.ps,'`"
outdvi="`echo $1 | sed 's,\.sgml$,.dvi,;s,\.sgm$,.dvi,'`"
# if we have a filename argument let us improve the
# temporary filename, sine gv and ghostview will display it.
# this TMPFN has $1 embedded in it
TMPFN=`echo $1 | sed 's/\.sgml//'`_db2pstmp$$
fi
fi
db2dvi "$@"
if [ ! -f ${TMPFN}.dvi ]
then
exit 1
fi
dvips $outdvi -o $output
if [ -f ${TMPFN}.ps ]
then
if [ $# -eq 1 ]
then
if [ -n "$output" ]
then
mv ${TMPFN}.ps $output
else
mv ${TMPFN}.ps db2ps.ps
fi
else
cat ${TMPFN}.ps
fi
fi
rm -f ${TMPFN}*
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment