#!/bin/sh
set -e

. optvars

for PACKAGE in `ls $KUMATUXOPT/`
do
    if [ -d $KUMATUXOPT/$PACKAGE/lib/X11/fonts -a ! -h $KUMATUXOPT/$PACKAGE/lib/X11/fonts ]
    then
	for FONTGROUP in `ls $KUMATUXOPT/$PACKAGE/lib/X11/fonts/`
	do
	    BASEGROUP=`basename $FONTGROUP`
	    for FILE in `ls $KUMATUXOPT/$PACKAGE/lib/X11/fonts/$BASEGROUP/`
	    do
		$KUMATUXCHECK/delete.sh /usr/share/fonts/X11/$BASEGROUP/$FILE $KUMATUXOPT/$PACKAGE/lib/X11/fonts/$BASEGROUP/$FILE
	    done
	done
    fi
done
