#!/bin/sh
# handle tgif file for latex, expects args %f %S
set -e			# die on any error
BASE=`basename $1 .obj`
IN=$2			# input file
OUT=$BASE.eps		# output file

[ -f "$IN" ] || exit 1	# ensure our file exists

tgif -print -eps -stdout "$IN" > "$OUT"

 echo \\includegraphics{$TARGET}