source: CMT/HEAD/mgr/cmt_system.sh @ 611

Last change on this file since 611 was 611, checked in by rybkin, 12 years ago

See C.L. 486

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/sh
2
3export LC_ALL=C
4#--------------------------------------------------
5select_system ()
6#--------------------------------------------------
7{
8  if test ! "${UNAME}" = "" ; then
9    echo ${UNAME}
10    return 0
11  else
12    UNAME=`uname`
13  fi
14
15  may_use_afs=1
16
17  case ${UNAME} in
18    Darwin)
19      may_use_afs=0
20      ;;
21  esac
22
23  if test ${may_use_afs} -eq 1; then
24    a=`fs sysname 2>/dev/null`
25    if test $? -eq 0 ; then
26      echo $a | awk "{
27            gsub(/[ :]/, \"\")
28            gsub(/'/, \" \")
29            sub(/Currentsysnameis/, \"\")
30            sub(/Currentsysnamelistis/, \"\")
31            print \$1
32      }"
33         
34      return 0
35    fi
36  fi
37
38  case ${UNAME} in
39    LynxOS)
40            echo `uname`-`uname -m`
41            return 0
42            ;;
43    Linux)
44           echo `uname`-`uname -m`
45           return 0
46           ;;
47    Darwin)
48           echo `uname`
49           return 0
50           ;;
51    CYGWIN*)
52           echo `uname`
53           return 0
54           ;;
55    OSF1)
56          if test `uname -r` = "V3.2" ; then
57            echo alpha_v3
58            return 0
59          fi
60          ;;
61    HP-UX)
62           if test `uname -m` = "9000/780" ; then
63             echo hp9000s780
64             return 0
65           elif test `uname -m` = "9000/735" ; then
66             echo hp9000s735
67             return 0
68           fi
69           ;;
70  esac
71
72  echo `uname -m`
73  return 0
74}
75
76#--------------------------------------------------
77# main ()
78#--------------------------------------------------
79
80select_system
Note: See TracBrowser for help on using the repository browser.