#!/bin/sh
set -e

. optvars

for PACKAGE in `ls $KUMATUXOPT/ | grep tegaki-wagomu_`
do
    if [ `echo $PACKAGE | sed 's/_.*//' | sed 's/\(tegaki-wagomu\)_.*/\1/'` = tegaki-wagomu ]
    then
	$KUMATUXCHECK/delete.sh /usr/lib/ocaml/lablgtk2 $KUMATUXOPT/$PACKAGE/lib/ocaml/lablgtk2
	for FILE in `ls $KUMATUXOPT/$PACKAGE/lib/ocaml/stublibs/`
	do
    	    $KUMATUXCHECK/delete.sh /usr/lib/ocaml/stublibs/$FILE $KUMATUXOPT/$PACKAGE/lib/ocaml/stublibs/$FILE
	done
    fi
done
