#!/bin/sh
# $FreeBSD: ports/chinese/moefonts-cid/files/pkg-deinstall.in,v 1.3 2009/04/02 21:43:40 hrs Exp $

GSVER=`gs --version`
GSDIR=/usr/local/share/ghostscript
FONTMAP=${GSDIR}/${GSVER}/Resource/Init/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}
