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