source: modipsl/trunk/util/w_i_h @ 12

Last change on this file since 12 was 12, checked in by bellier, 17 years ago

JB: svn now !

  • Property svn:executable set to *
File size: 2.3 KB
Line 
1#!/bin/sh
2# $Id$
3#---------------------------------------------------------------------
4#- w_i_h                                                    04/10/1999
5#- Reconnaissance du systeme
6#---------------------------------------------------------------------
7( uname -s 1> /dev/null ) 2> /dev/null
8if [ $? -ne 0 ]; then
9  exit 1;
10fi;
11#-
12USYS=`uname -s`;
13#-
14if   [ "$USYS" = "AIX" ]; then
15  WSYS=`uname -n | sed -e "s/^\(zahir\)\(.*\)/\1/"`;
16  if [ "$WSYS" = "zahir" ]; then
17    DSYS="aix";
18  else
19    DSYS="ax_mono";
20  fi;
21elif [ "$USYS" = "AIXESA" ]; then
22  DSYS="aixesa";
23elif [ "$USYS" = "ConvexOS" ]; then
24  DSYS="convex";
25elif [   "$USYS" = "CP486" \
26      -o "$USYS" = "dev"  ]; then
27  DSYS="sco";
28elif [ "$USYS" = "Darwin" ]; then
29  DSYS="Darwin";
30elif [ "$USYS" = "HP-UX" ]; then
31  WSYS=`uname -n`;
32  if [ "$WSYS" = "moon" ]; then
33    DSYS="eshpux";
34  else
35    DSYS="hpux";
36  fi;
37elif [ "$USYS" = "IRIX" ]; then
38  WSYS=`uname -r | sed -e "s/\..*//"`
39  if [ "$WSYS" = "4" ]; then
40    DSYS="sgi4";
41  else
42    DSYS="sgi5";
43  fi;
44elif [ "$USYS" = "IRIX64" ]; then
45  DSYS="sgi6";
46elif [ "$USYS" = "Linux" ]; then
47  WSYS=`uname -n | sed -e "s/^\(asterix\)\(.*\)/\1/" \
48                        -e "s/^\(obelix\)\(.*\)/\1/" \
49                        -e "s/^\(ds\)\([0-9]*\)/\1/"`
50  if [   "$WSYS" = "asterix" \
51      -o "$WSYS" = "obelix" ]; then
52    DSYS="lxiv8";
53  elif [ "$WSYS" = "mercure" ]; then
54    DSYS="sx8mercure";
55  elif [ "$WSYS" = "brodie" ]; then
56    DSYS="sx8brodie";
57  elif [ "$WSYS" = "ds" ]; then
58    DSYS="sxdkrz";
59  else
60    DSYS="linux";
61  fi;
62elif [ "$USYS" = "MIPS" ]; then
63  DSYS="mips";
64elif [ "$USYS" = "OSF1" ]; then
65  DSYS="osf1";
66elif [ "$USYS" = "SunOS" ]; then
67  WSYS=`uname -r | sed -e "s/\..*//"`
68  if [ "$WSYS" = "5" ]; then
69    WSYS=`uname -r | sed -e "s/.*\.//"`
70    if [   "$WSYS" = 1 \
71        -o "$WSYS" = 2 \
72        -o "$WSYS" = 3 ]; then
73      DSYS="solaris";
74    else
75      DSYS="solaris";
76    fi;
77  else
78    DSYS="sun";
79  fi;
80elif [ "$USYS" = "SUPER-UX" ]; then
81  DSYS="nec";
82elif [ "$USYS" = "ULTRIX" ]; then
83  DSYS="ultrix";
84elif [   "$USYS" = "UNICOS" \
85      -o "$USYS" = "sn4803" \
86      -o "$USYS" = "sn4602" ]; then
87  DSYS="cray";
88elif [ "$USYS" = "UNIX_System_V" ]; then
89  DSYS="fjvpp";
90else
91  WSYS=`uname -m`;
92  if [ "$WSYS" = "CRAY T3E" ]; then
93    DSYS="t3e";
94  else
95    DSYS="Unknown";
96  fi;
97fi;
98#-
99echo "$DSYS";
100#-
101exit 0;
Note: See TracBrowser for help on using the repository browser.