#!/bin/bash

ADOBE_SPYPATH="$HOME/.macromedia/Flash_Player/#SharedObjects"
 msg ()
{
	if [ "$LOGLEVEL" -eq 0 ]
	then
		return 0;
	fi
	echo -e $MSG
}

if [ "$1" = "quiet" ] 
then

	LOGLEVEL=0
else
	
	LOGLEVEL=1
fi
MSG="LOGLEVEL $LOGLEVEL"
msg
if [ -d $ADOBE_SPYPATH ]
then
	MSG="\n ...Directory \"$ADOBE_SPYPATH\" found..."
	msg
	
	for a in $(ls $ADOBE_SPYPATH)
	do
		MSG=MSG1="\n ...going through $ADOBE_SPYPATH/$a"
	
		if [ -d $ADOBE_SPYPATH/$a ] && [ $a != macromedia.com ]
		then
			MSG="\n ...going through $ADOBE_SPYPATH/$a"
			msg		
			#MSG="\n Spydir \"$ADOBE_SPYPATH/$a\" contains:\n"
			for b in $(ls $ADOBE_SPYPATH/$a)
			do	
				MSG="\t  dumped $ADOBE_SPYPATH/$a/$b"
				rm -r $ADOBE_SPYPATH/$a/$b 
				msg
			done
		
		fi
	done
fi

