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