#!/bin/sh
##
## make-raster.sh
## 
## Made by Paul
## Login   <manowar@ubuntu.home>
## 
## Started on  Sun Apr 20 13:12:00 2008 Paul
## Last update Mon Apr 28 00:36:19 2008 Paul
##

FIG=`basename $1`
if [ ! -e "$1.eps" -o "$1" -nt "$1.eps" ]; then
    convert $1 $1.eps
    RET=$?
    if [ "$RET" -ne 0 ]; then
	echo "Convertion failed ($RET)" 1>&2
	exit $RET
    fi
    echo "Figure $FIG converted successfully." 1>&2
fi
ROT=${3:-0}
cat <<EOF
\includegraphics[scale=$2,angle=$ROT,origin=c]{$FIG.eps}
EOF
