#! /bin/bash
#
g++ -c -g -Wall damped_sine_plot.cpp
if [ $? -ne 0 ]; then
  echo "Compile error."
  exit
fi
#
g++ -o damped_sine_plot damped_sine_plot.o -lm
if [ $? -ne 0 ]; then
  echo "Load error."
  exit
fi
rm damped_sine_plot.o
#
./damped_sine_plot > damped_sine_plot.txt
rm damped_sine_plot
#
gnuplot < damped_sine_commands.txt
#
echo "Normal end of execution."
