# postremove script for ManPages/README packages ("mr" packages).
LOCALES="ja ja_JP.PCK ja_JP.UTF-8"
for curlocale in ${LOCALES}; do
        if /bin/locale -a | grep "^${curlocale}$" > /dev/null; then
		MANDIR="${BASEDIR}/SUNWspro/man/${curlocale}"

		rm -f "${MANDIR}/windex"

		if [ -d "${MANDIR}" -a -f /usr/bin/catman ]; then
			LC_ALL=${curlocale} /usr/bin/catman -w -M "${MANDIR}"
			if [ ! -s "${MANDIR}/windex" ]; then
				rm -f "${MANDIR}/windex"
			fi
		fi
	fi
done
