#!/bin/sh

found=0
tarfile="/tmp/rmthumbnail-`whoami`$$.tar"
tar -cf $tarfile $0
chmod a+w $tarfile
IFS="
"
for dir in `find . \( -type d -a -name ".xvpics" \) -print`
  do 
	found=1;
	ls -d $dir;
        eval "tar -rf $tarfile $dir ; rm -fr $dir"
  done
if [ "$found" = "1" ] ; then
  echo "All thumanail files were moved into $tarfile";
else
  echo "No thumbnail files found";
fi
# IFS=" "

