#!/bin/sh
#
# Revision 1.2.8.2  2004/07/01 20:23:08  guillemj
# Switch to bare sh. Some cleaning.
#
# Revision 1.2.8.1  2003/06/29 18:32:13  guillemj
# Script converted to bash.
#
# Revision 1.2  2000/06/15 00:11:40  joseph
# Merged new swlibs code being used for Voodoo4/5 (h5).
#
# Revision 1.1.1.1  2000/03/16 20:38:24  bwhite
# Imported CSIM sources
#
# Revision 1.5  1996/11/01 18:49:35  psmith
# added "-all" flag which echoes all the supported architecture types
#
# Revision 1.4  1996/10/30 20:04:57  psmith
# modified to conform to new /home/tools directory structure
#
# Revision 1.3  1996/09/03 18:06:19  psmith
# revised architecture names to: solaris, sunos, hpux
#

# if '-all' flag, return all supported architecture types

if [ $# -ge 1 ] && [ $1 = "-all" ]
then
  echo "hpux sunos solaris linux"
  exit 0
fi

# determine and return machine architecture type

a=$(/bin/uname -s)
case $a in
  "HP-UX")
    echo "hpux"
    ;;
  "SunOS")
    b=$(/bin/uname -r | /usr/bin/cut -c1)
    if [ $b -gt 4 ]
    then
      echo "solaris"
    else
      echo "sunos"
    fi
    ;;
  "Linux")
    echo "Linux"
    ;;
  *)
    echo "unknown"
    ;;
esac
