#!/bin/sh - # # xpm2gif files... # # This uses the pbmplus package to convert the xpm files to gif format # # Anthony Thyssen 12 Feb 1994 anthony@cit.gu.edu.au # gifopts= if [ "X$1" = "X-trans" ]; then gifopts="-transparent white" fi for i in "$@" ; do if [ -f $i ]; then echo "converting \"$i\"" name="`basename $i`" name="`expr "$name" : '\([^.]*\)'`" j=`basename $i .xpm` sed -f $HOME/bin/bmaps/x2p.sed "$i" | xpmtoppm |\ ppmtogif $gifopts 2>/dev/null > $j.gif if [ ! -s $j.gif ]; then rm -f $j.gif echo >&2 "Unable to convert \"$i\"" fi fi done