# $NetBSD: format-deinstall.tmpl,v 1.3 2010/01/28 22:37:33 minskim Exp $ # # Delete format files. # FMTUTIL_CNF=${PKG_SYSCONFBASE}/texmf/web2c/fmtutil.cnf case ${STAGE} in DEINSTALL) format_names="@FORMAT_NAMES@" for f in $format_names ; do @CAT@ @PREFIX@/share/texmf/fmtutil/format.$f.cnf | @GREP@ "^[^#]" | 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) if [ "$format" = "mpost" ]; then fmtfile="mp*.mem" else fmtfile="$format.mem" fi 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 done @FIND@ -d @VARBASE@/lib/texmf -type d -empty -exec @RMDIR@ {} \; ;; *) ;; esac