#! /bin/bash
#
#  Render a PDF image of the graph with the default "dot" method.
#
dot -Tpdf jeff_wheeler_genealogy.dot -o jeff_wheeler_genealogy.pdf
#
if [ $? -ne 0 ]; then
  echo "Error creating default PDF image."
  exit
fi
#
#  Render a PDF image of the graph using Force-Directed-Placement.
#
dot -Tpdf -Kfdp jeff_wheeler_genealogy.dot -o jeff_wheeler_genealogy_fdp.pdf
#
if [ $? -ne 0 ]; then
  echo "Error creating FDP PDF image."
  exit
fi
#
#  Render a PNG image of the graph with the default "dot" method.
#
dot -Tpng jeff_wheeler_genealogy.dot -o jeff_wheeler_genealogy.png
#
if [ $? -ne 0 ]; then
  echo "Error creating default PDF image."
  exit
fi
#
#  Render a PNG image of the graph using Force-Directed-Placement.
#
dot -Tpng -Kfdp jeff_wheeler_genealogy.dot -o jeff_wheeler_genealogy_fdp.png
#
if [ $? -ne 0 ]; then
  echo "Error creating FDP PDF image."
  exit
fi
#
echo "Normal end of execution."
