#!/bin/bash
# usage:
#   map-gif2png
#
# all files from current directory:
# convert all GIF maps to PNG format (better compression)
# and adjust all KAL calibration files

# get gif2png here: http://catb.org/~esr/gif2png/
# compile: ./configure ; make ; make install

hash gif2png

find . -maxdepth 1 -name '*.gif' -print0 | xargs -I '{}' -0 gif2png -O -s -r -v -d '{}'
find . -maxdepth 1 -name '*.kal' -print0 | xargs -I '{}' -0 sed -i s/.gif/.png/g '{}'
