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