#!/bin/sh


NAME=$1
shift
FILES=""
for F in $* ; do
	FILES="${FILES} ../bin/$F.xpm"
done
#echo ${NAME}

(./mkxpmbutt ${NAME} ${FILES} | convert +compress  XPM:- PNG:temp.png) 2>&1
#(./mkxpmbutt ${NAME} ${FILES} | convert +compress -transparency '#111' XPM:- PNG:temp.png) 2>&1
#(./mkxpmbutt ${NAME} ${FILES} | xpmtoppm | pnmtopng -force > temp.png) 2>&1
#(mkxpmbutt ${NAME} ${FILES} | convert -transparency '#111' XPM:- PNG:temp.png) 2>&1
if cmp -s temp.png png.d/${NAME}.png ; then
	rm temp.png
else
	echo updating ${NAME}.png
	mv temp.png png.d/${NAME}.png
fi
