File:  [EPICS Repository] / startup / EpicsHostArch
Revision 1.2: download - view: text, annotated - select for diffs
Tue Jan 16 16:41:10 2001 UTC (16 years, 11 months ago) by jba
Branches: MAIN
CVS tags: R3-13-6, R3-13-5, HEAD
Updated comment and added i686 for linux.

#!/bin/sh
#
# base/bin/tools/EpicsHostArch - returns the Epics host architecture suitable
#                           for assigning to the EPICS_HOST_ARCH variable

sysname=`uname`

case $sysname in
    Linux )
        os=linux
		cpu=`uname -m`
        case $cpu in i386 | i486 | i586 | i686)
            cpu=x86
			;;
		esac
		echo ${os}-${cpu}
        ;;
    HP-UX )
        os=hpux
		cpu=`uname -m`
        case $cpu in 9000/[34678]??)
            cpu=m68k
			;;
		esac
		echo ${os}-${cpu}
        ;;
    OSF1 )
        os=osf
		cpu=`uname -m`
		echo ${os}-${cpu}
        ;;
    SunOS )
        version=`uname -r | sed '1s/^\([0-9]*\).*$/\1/'`
        if [ ${version} -ge 5 ]; then
            os=solaris
        else
            os=sun4
        fi
		cpu=`uname -m`
        case $cpu in
		 sun4*)
            cpu=sparc
			;;
        i86pc)
            cpu=x86
			;;
		esac
		echo ${os}-${cpu}
        ;;
    * )
        echo unsupported
        ;;
esac


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>