#!/bin/sh
# Compile roots.c and move the executable to ~/bin if it exists.
# roots is a command line numerical polynomial equation solver.
# Requires the GNU Scientific Library (GSL) development files.

echo Compiling roots.c
gcc -O -Wall $LDFLAGS $CFLAGS -o roots roots.c -lgsl -lgslcblas || exit
if [ -d ~/bin ]
then
	echo Moving result to ~/bin
	mv roots ~/bin || exit
fi
echo Done, type \"roots\" to run.
