source: CMT/v1r19/mgr/cmt_system.sh @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

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