#!/bin/sh
# don't forget to install ImageMagick !!!!

analyse () { 
if [ ! -d $DIRECTORY/8bit ]
then
 mkdir $DIRECTORY/8bit
fi

cd $DIRECTORY

for i in *.xpm
do convert -colors 10 $i ./8bit/$i
done

cd ..
}

DIRECTORY=applications/icons
analyse
DIRECTORY=applications/backgrounds
analyse
DIRECTORY=wharf/icons
analyse
DIRECTORY=wharf/backgrounds
analyse

echo " "
echo "Done !"
