#! /bin/bash
#
gcc -c -g -Wall -I/$HOME/include tsp_dantzig42_test.c
if [ $? -ne 0 ]; then
  echo "Compile error."
  exit
fi
#
gcc -o tsp_dantzig42_test tsp_dantzig42_test.o /$HOME/libc/tsp_dantzig42.o -lm
if [ $? -ne 0 ]; then
  echo "Load error."
  exit
fi
rm tsp_dantzig42_test.o
#
./tsp_dantzig42_test > tsp_dantzig42_test.txt
if [ $? -ne 0 ]; then
  echo "Run error."
  exit
fi
rm tsp_dantzig42_test
#
#  Run gnuplot to generate image.
#
gnuplot < dantzig42_commands.txt
rm dantzig42_commands.txt
rm dantzig42_data.txt
#
echo "Normal end of execution."
