#! /bin/bash
#
gfortran -c -g -Wall faithful_histogram.f90
if [ $? -ne 0 ]; then
  echo "Compile error."
  exit
fi
#
gfortran faithful_histogram.o
if [ $? -ne 0 ]; then
  echo "Load error."
  exit
fi
rm faithful_histogram.o
#
mv a.out faithful_histogram
./faithful_histogram > faithful_histogram.txt
if [ $? -ne 0 ]; then
  echo "Run error."
  exit
fi
rm faithful_histogram
#
#  Create graphics.
#
gnuplot < faithful_commands.txt
#
echo "Normal end of execution."
