Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/tests/bin/arch-n-opsys.sh
ViewVC logotype

View of /sml/trunk/tests/bin/arch-n-opsys.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 548 - (download) (as text) (annotate)
Tue Feb 29 16:38:11 2000 UTC (19 years, 9 months ago) by dbm
File size: 2129 byte(s)
Initial revision
#!/bin/ksh
#
# .arch-n-opsys  -- get architecture and system info
#

export PATH
PATH="/bin:/usr/bin"

case `uname -s` in
  HP-UX)
    ARCH=hppa
    case `uname -r` in
      *.09.*) OPSYS=hpux9 ;;
      *.10.*) OPSYS=hpux ;;
      *) exit 1 ;;
    esac
    ;; 
  IRIX*)
    ARCH=mipseb
    case `uname -r` in
      4.*) OPSYS=irix4; HEAP_OPSYS=irix;;
      5.*) OPSYS=irix5; HEAP_OPSYS=irix;;
      6.*) OPSYS=irix6; HEAP_OPSYS=irix;;
      *) exit 1;;
    esac
    ;;
  SunOS)
    case `uname -r` in
      4.*)
	OPSYS=sunos
	case `/usr/bin/arch` in
	  sun4) ARCH=sparc;;
	  *) exit 1;;
	esac
      ;;
      5.*)
	OPSYS=solaris
	case `uname -p` in
	  sparc) ARCH=sparc;;
	  i386) ARCH=x86;;
	  i486) ARCH=x86;;
	  i586) ARCH=x86;;
	  i686) ARCH=x86;;
	  *) exit 1;;
	esac
      ;;
      *) exit 1;;
    esac
    ;;
  AIX)
    OPSYS=aix
    ARCH=ppc
    ;;
  OSF1)
    case `uname -m` in
      alpha)
	case `uname -r` in
	  V2.*) ARCH=alpha32x; OPSYS=osf1 ;;
	  V3.*) ARCH=alpha32x; OPSYS=osf1 ;;
	  V4.*) ARCH=alpha32; OPSYS=dunix ;;
	  *) exit 1 ;;
	esac 
        ;;
      *) exit 1 ;;
    esac 
    ;;
  Linux)
    OPSYS=linux
    case `uname -m` in
      i386) ARCH=x86;;
      i486) ARCH=x86;;
      i586) ARCH=x86;;
      i686) ARCH=x86;;
      ppc)
	ARCH=rs6000
	case `uname -r` in
	  *osfmach*) OPSYS=mklinux ;;
	  *) exit 1 ;;
	esac
	;;
      *) exit 1;;
    esac
    ;;
  FreeBSD)
    OPSYS=freebsd
    HEAP_OPSYS=bsd
    case `uname -m` in
      i386) ARCH=x86;;
      i486) ARCH=x86;;
      i586) ARCH=x86;;
      i686) ARCH=x86;;
      *) exit 1;;
    esac
    ;;
  NetBSD)
    OPSYS=netbsd
    HEAP_OPSYS=bsd
    case `uname -m` in
      i386) ARCH=x86;;
      i486) ARCH=x86;;
      i586) ARCH=x86;;
      i686) ARCH=x86;;
      *) exit 1;;
    esac
    ;;
  Windows_NT)
    OPSYS=win32
    case `uname -m` in
      386) ARCH=x86;;
      486) ARCH=x86;;
      586) ARCH=x86;;
      686) ARCH=x86;;
      *) exit 1;;
    esac
    ;;
  *) exit 1;;
esac

if [ "$HEAP_OPSYS" = "" ]; then
  HEAP_SUFFIX="$ARCH-$OPSYS"
else
  HEAP_SUFFIX="$ARCH-$HEAP_OPSYS"
fi

echo "ARCH=$ARCH; OPSYS=$OPSYS; HEAP_SUFFIX=$HEAP_SUFFIX"


root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0