#!/bin/bash

# test the required utils are installed
for i in xbmtopbm pnmscale pgmtopbm pbmtoxbm ; do
    if ! which $i >/dev/null ; then
	echo "`basename $0`: Can't find \"$i\". Is package \"netpbm\" installed ?"
        exit 1
    fi
done

[ -e mini ] && rm -r mini
mkdir mini

for i in *xbm ; do
xbmtopbm $i  | pnmscale -xsize=72 -ysize=72  2>/dev/null \
	     | pgmtopbm | pbmtoxbm >mini/$i 
done
