#!/bin/bash
#
# giftogif.sh - small script that fixes bad gif compressions from Electric Eyes among other programs
# Copyright (C) 2002 Oskar Andreasson
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
# USA

mkdir backup
for afile in ./* ; do
	if [ `echo $afile |grep .gif` ] ; then
		cp $afile backup/
		cp -f $afile tmp.gif
		giftopnm tmp.gif | ppmtogif - > $afile
		rm tmp.gif
	fi
done 
