#!/bin/sh
# this script returns the correct value for environment variable ESMF_OS
esmf_os=`uname -s`
if [ $esmf_os = UNICOS/mp ]; then
esmf_os=Unicos
fi
if [ $esmf_os = Linux ]; then
# determine if this is Linux on Cray, i.e. Unicos
which ftn > esmf_os.tmp 2>&1
ftn_test=`grep -e cray -e bin/ftn esmf_os.tmp`
rm -f esmf_os.tmp
if [ -n "$ftn_test" ]; then
esmf_os=Unicos
fi
fi
cygwin_test=`echo $esmf_os | grep -i cygwin`
if [ -n "$cygwin_test" ]; then
esmf_os=Cygwin
fi
mingw_test=`echo $esmf_os | grep -i mingw`
if [ -n "$mingw_test" ]; then
esmf_os=MinGW
fi
echo $esmf_os
