#!/bin/sh
# $FreeBSD: ports/chinese/moefonts-cid/files/pkg-deinstall.in,v 1.2 2006/02/27 12:06:30 hrs Exp $

GSVER=`gs --version`
GSDIR=/usr/local/share/ghostscript
FONTMAP=${GSDIR}/${GSVER}/lib/Fontmap.GS
FONTMAPTMP=${FONTMAP}.tmp

# Run just once.
if [ "x$2" != "xDEINSTALL" ]; then
  exit 0
fi

cp ${FONTMAP} ${FONTMAPTMP}
sed -e "/^\/MOE.*/d" ${FONTMAP} > ${FONTMAPTMP}
mv -f ${FONTMAPTMP} ${FONTMAP}
