#!/bin/sh
# Compile roots.c and move the executable to ~/bin if it exists.
# Requires the GNU Scientific Library (GSL) development files.

echo Compiling roots.c
cc $LDFLAGS $CFLAGS -O -Wall -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.
