#!/bin/sh

angle=90

case "`basename $0`" in
	*90) 
		angle=90;
		;;
	*180) 
		angle=180;
		;;
	*270) 
		angle=270;
		;;
esac

while test -f "$1"; do
	convert -rotate $angle $1 $1;
	shift;
done
