#!/bin/sh
# this little shell script simply attempts to automatically make, and install
# netscript. (this turned into a "portable" shell script, that is why it isn't
# exactly pretty(but, i am not very pretty/clean anyways) -- made to work on
# different platforms)
echo "[ netscript/automake: automation of compiling sequence. (generic modules) ]"
echo "* Attempting to see if gcc is located on this system..."
CHECKGCC=`which gcc 2>/dev/null`
if test -x "$CHECKGCC"
then
 echo "* Found gnu compiler to compile with..."
else
 echo "! no gnu compiler found to compile with."
 exit
fi
echo "* Deleting any old data if possible..."
make clean
echo "* Attempting to use uname to decide what to compile as..."
COMPTYPE=`uname`
if test -z $COMPTYPE
then
 echo "! no operating system found."
 exit
fi
echo "* Attempting to see if GTK is located on this system..."
CHECKGUI=`which gtk-config 2>/dev/null`
if test -x "$CHECKGUI"
then
 CHECKGUI="G"
else
 CHECKGUI=""
fi
echo "* Attempting to use type \"$COMPTYPE\" as compiler type..."
make $CHECKGUI$COMPTYPE
echo "* Done."
