#! /bin/bash
#
g++ -c -g -Wall -I/$HOME/include tsp_nearest_test.cpp
if [ $? -ne 0 ]; then
  echo "Compile error."
  exit
fi
#
g++ -o tsp_nearest_test tsp_nearest_test.o /$HOME/libcpp/tsp_nearest.o -lm
if [ $? -ne 0 ]; then
  echo "Load error."
  exit
fi
rm tsp_nearest_test.o
#
./tsp_nearest_test > tsp_nearest_test.txt
if [ $? -ne 0 ]; then
  echo "Run error."
  exit
fi
rm tsp_nearest_test
#
gnuplot < att48_commands.txt
rm att48_commands.txt
rm att48_data.txt
#
echo "Normal end of execution."
