#!/bin/sh
#set -e

. $KUMATUXBIN/kumatux.org-vars

FIRSTDEL=1
for DIRECTORY in $KUMATUXROOTDIRSNOTHIRD
do
    for FILE in `ls /$DIRECTORY/`
    do
	if [ $FIRSTDEL = 1 ]
	then
	    $KUMATUXMESSAGE "Deleting \`$KUMATUXROOTDIRSNOTHIRD' in / content..."
	    FIRSTDEL=0
	fi
        rm -v $KUMATUXROOT/$DIRECTORY/$FILE
    done
done
if [ $FIRSTDEL = 0 ]
then
    $KUMATUXMESSAGE "\`$KUMATUXROOTDIRSNOTHIRD' in $KUMATUXROOT/ content deleted."
fi

FIRSTDEL=1
for DIRECTORY in $KUMATUXPYTHONVERSIONS
do
    for FILE in `ls /$KUMATUXROOTPYTHON/$DIRECTORY/`
    do
        if [ $FIRSTDEL = 1 ]
	then
    	    $KUMATUXMESSAGE "Deleting \`$KUMATUXPYTHONVERSIONS' in $KUMATUXROOT/$KUMATUXROOTPYTHON/ content..."
	    FIRSTDEL=0
	fi
	rm -v $KUMATUXROOT/$KUMATUXROOTPYTHON/$DIRECTORY/$FILE
    done
done
if [ $FIRSTDEL = 0 ]
then
    $KUMATUXMESSAGE "\`$KUMATUXPYTHONVERSIONS' IN $KUMATUXROOT/$KUMATUXROOTPYTHON/ content deleted."
fi
