#!/bin/bash
case $# in
0) input="test.dot"
   output="test.png";;
1) input=$1; output="test.png";;
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 PNG file ..."
   echo "dot -Gratio=compact -Gfontname=\"Helvetica\" $input -Tpng -o $output -Gordering=\"out\" -Gsize=\"7.5,10\""
   dot -Gratio=compact -Gfontname="Helvetica" $input -Tpng -o $output -Gordering="out" -Gsize="7.5,10"
else
   echo "Can't find GraphViz dot program in user's path, ignoring conversion to PNG file (not a problem) ..."
fi




