41 lines
980 B
Cheetah
41 lines
980 B
Cheetah
# $NetBSD: format-deinstall.tmpl,v 1.1 2012/10/14 21:30:33 minskim Exp $
|
|
#
|
|
# Delete format files.
|
|
#
|
|
|
|
FMTUTIL_CNF=${PKG_SYSCONFBASE}/texmf/web2c/fmtutil.cnf
|
|
|
|
case ${STAGE} in
|
|
DEINSTALL)
|
|
formats=@FORMATS@
|
|
if [ "$formats" != "" ]; then
|
|
@PRINTF@ "$formats" |
|
|
while read format engine junk; do
|
|
${GREP} -v "^${format}[[:space:]][[:space:]]*${engine}[[:space:]]" ${FMTUTIL_CNF} > \
|
|
${FMTUTIL_CNF}.tmp &&
|
|
${MV} ${FMTUTIL_CNF}.tmp ${FMTUTIL_CNF}
|
|
case "$engine" in
|
|
mpost)
|
|
fmtfile="$format.mem"
|
|
texengine=metapost
|
|
;;
|
|
mf*)
|
|
fmtfile="$format.base"
|
|
texengine=metafont
|
|
;;
|
|
*)
|
|
fmtfile="$format.fmt"
|
|
texengine=$engine
|
|
;;
|
|
esac
|
|
@RM@ -f @VARBASE@/lib/texmf/web2c/$texengine/$fmtfile
|
|
@RM@ -f @VARBASE@/lib/texmf/web2c/$texengine/$format.log
|
|
done
|
|
fi
|
|
@FIND@ @VARBASE@/lib/texmf -depth -type d -exec @RMDIR@ {} \; 2>/dev/null
|
|
@MKTEXLSR@ @VARBASE@/lib/texmf
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|