#! /bin/bash
#
gfortran -c -g -Wall sinc_test.f
if [ $? -ne 0 ]; then
  echo "Compile error."
  exit
fi
#
gfortran -o sinc_test sinc_test.o $HOME/libf77/sinc.o
if [ $? -ne 0 ]; then
  echo "Load error."
  exit
fi
rm sinc_test.o
#
./sinc_test > sinc_test.txt
if [ $? -ne 0 ]; then
  echo "Run error."
  exit
fi
rm sinc_test
#
gnuplot sincn_antideriv_commands.txt
gnuplot sincn_deriv_commands.txt
gnuplot sincn_deriv2_commands.txt
gnuplot sincn_fun_commands.txt
gnuplot sincu_antideriv_commands.txt
gnuplot sincu_deriv_commands.txt
gnuplot sincu_deriv2_commands.txt
gnuplot sincu_fun_commands.txt
#
rm *_commands.txt
rm *_data.txt
echo "Normal end of execution."
