#!/bin/bash
# Script to install earthtrack
#
if [ ! -x $PWD/earthtrack ]; then
	$PWD/build
fi
whoami=`whoami`
if [ ! -x /usr/local/bin/earthtrack ]; then
	if [ $whoami != "root" ]; then
		echo "Sorry, $whoami.  You need to be 'root' to install this program.  :-("
	else
		ln -s $PWD/earthtrack /usr/local/bin/earthtrack
	fi
fi

if [ ! -x /usr/local/bin/earthtrack2 ]; then
	if [ $whoami != "root" ]; then
		echo "Please su to root and re-run the 'install' script again."
	else
		ln -s /usr/local/bin/earthtrack /usr/local/bin/earthtrack2
	fi
fi
