#! /bin/bash
#
gcc -c -g -Wall -I/$HOME/include rk2_implicit_test.c
if [ $? -ne 0 ]; then
  echo "Compile error."
  exit
fi
#
gcc -o rk2_implicit_test rk2_implicit_test.o \
  $HOME/libc/rk2_implicit.o \
  $HOME/libc/fsolve.o \
  -lm
if [ $? -ne 0 ]; then
  echo "Load error."
  exit
fi
rm rk2_implicit_test.o
#
./rk2_implicit_test > rk2_implicit_test.txt
if [ $? -ne 0 ]; then
  echo "Run error."
  exit
fi
rm rk2_implicit_test
#
gnuplot < humps_commands.txt
gnuplot < predator_prey_commands.txt
gnuplot < stiff_commands.txt
#
echo "Normal end of execution."
