#!/bin/sh
#
# Determines if the OSTYPE variable reflects a tested platform.
# (The name of the script is for consistency with similar script names,
# and OSTYPE is only used in relation to paths/filenames).
# This can be used as either as a stand-alone or as a call from other scripts such as "go".
#
# As with all ELM scripts, stay with Bourne shell (/bin/sh) for universal application.


####
#### Operating Sytem Type
# Check that OSTYPE has been tested for the build of the model
#
#

if test "$OSTYPE" = "solaris"
  then
	#  echo "solaris OS"
	this=that
elif test "$OSTYPE" = "linux"
  then
	#  echo "linux OS"
	this=that
elif test "$OSTYPE" = "darwin"
  then
	#  echo "darwin OS"
	this=that
else 
  # clear the screen
  clear
  OSuname=`uname`
  echo "###### Warning (from \"PathOSTYPE\" script):"
  echo "Your OSTYPE=\"$OSTYPE\" is not one that has been tested for ELM." 
  echo "The known types are solaris, linux, and darwin. "
  echo ""
  echo "Your OS is \"$OSuname\" according to uname.  However, we currently use the "
  echo "environment variable OSTYPE to identify the type of operating system you use."
  echo ""
  echo "The model executable name is suffixed with OSTYPE, and the object files "
  echo "are put in separate directories depending on the name of OSTYPE. "
  echo "Thus the OSTYPE environment variable must be defined in your shell. "
  echo ""
  echo "Note: OSTYPE is only used to allow one set of source code to serve "
  echo "multiple OS implementations, by separating compiled object files into"
  echo "different directories according to OSTYPE "
  echo ""
  echo "** There is no OS-specific code in the ELM."
  echo "If you are using gcc and a flavor of Linux, Mac OS X, or Sun Solaris "
  echo "(and possibly others), the code should compile and run ok."
  echo "Note: edit the $ELM_HOME/SME/scripts/PathOSTYPE script to get rid of this warning."
  echo ""
fi

