#!/bin/bash
case $# in
0) input="test.dot"
   output="test.pdf";;
1) input=$1; output="test.pdf";;
2) input=$1; output=$2;;
esac

# DQ (8/11/2006):
# Added test for dot so that where this is called in ROSE it is not a 
# problem if it is not present (removes dependence within ROSE on dot).
if (`dot -V >& /dev/null`) then
   echo "Found dot program in user's path, generating postscript file ..."
   dot -v -Gratio=compact -Gfontname="Helvetica" $input -Tps2 -o $output.ps_temp -Gordering="out" -Gsize="7.5,10"
   ps2pdf $output.ps_temp $output
   rm -f $output.ps_temp
else
   echo "Can't find GraphViz dot program in user's path, ignoring conversion to postscript file (not a problem) ..."
fi




