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