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