guess_port 888 Bytes
Newer Older
Eric Coissac's avatar
Eric Coissac committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#! /bin/sh
# 
# $Id: guess_port 1825 2013-02-26 09:39:47Z viari $
#
# @file: guess_port
# @desc: attempt to guess the portname
# @usage: guess_port
#
# @history:
# @+ <Gloup> Nov. 2000 first draft adapted from GNU config.guess
# @+ <Gloup> Feb. 2010 moved to sh
#

mach=`uname -m`
syst=`uname -s`
rels=`uname -r`

case ${mach}:${syst}:${rels} in

    alpha:OSF1:*     )  echo alpha-osf1;;
    sun4*:SunOS:5.*  )  echo sparc-solaris;;
    i86pc:SunOS:5.*  )  echo i386-solaris;;
    sun4*:SunOS:*    )  echo sparc-sunos;;
    Power*:Darwin:*  )  echo ppc-darwin;;
    i*86:Linux:*     )  echo i386-linux;;
    x*86*:Linux:*    )  echo i386-linux;;
    i*86:Darwin:*    )  echo i386-darwin;;
28
    x*86*:Darwin:*   )  echo i386-darwin;;
Eric Coissac's avatar
Eric Coissac committed
29 30 31 32 33 34
    IP*:IRIX*:*      )  echo mips-irix;;
    i*86:MINGW32*:*  )  echo x86-mingw32;;
    
    *) echo unknown ${mach}:${syst}:${rels}; exit 1;;
esac
exit 0