#!/bin/sh
# Compile polyroots.c and move the executable to ~/bin if it exists

echo Compiling polyroots.c
cc $* -s -O2 -Wall -o polyroots polyroots.c -lgsl -lgslcblas || exit
if [ -d ~/bin ] ; then
	echo Moving result to ~/bin
	mv polyroots ~/bin || exit
fi
echo Done.
