#!/bin/sh
set -e

. optvars

for APP in `ls $KUMATUXOPT/`
do
    APPNAME=`echo $APP | sed 's/_.*//'`
    for PYVER in $KUMATUXPYTHONVERSIONS
    do
	if [ -d $KUMATUXOPT/$APP/lib/python$PYVER/site-packages -a ! $APPNAME = python ]
	then
    	    for FILE in `ls $KUMATUXOPT/$APP/lib/python$PYVER/site-packages/`
	    do
		$KUMATUXCHECK/delete.sh /usr/lib/python$PYVER/site-packages/$FILE $KUMATUXOPT/$APP/lib/python$PYVER/site-packages/$FILE
	    done
	fi
    done
done
