source: modipsl/trunk/util/w_i_h @ 2

Last change on this file since 2 was 2, checked in by rblod, 18 years ago

First import of modipsl utilities

  • Property svn:executable set to *
File size: 2.4 KB
Line 
1#!/bin/sh
2# $Id: w_i_h,v 2.4 2006/01/18 05:59:17 adm Exp $
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  WSYS=`uname -n`;
46  if [ "$WSYS" = "rhodes" ]; then
47    DSYS="sxnec";
48  else
49    DSYS="sgi6";
50  fi;
51elif [ "$USYS" = "Linux" ]; then
52  WSYS=`uname -n | sed -e "s/^\(asterix\)\(.*\)/\1/" \
53                        -e "s/^\(obelix\)\(.*\)/\1/" \
54                        -e "s/^\(ds\)\([0-9]*\)/\1/"`
55  if [   "$WSYS" = "asterix" \
56      -o "$WSYS" = "obelix" ]; then
57    DSYS="lxiv8";
58  elif [ "$WSYS" = "mercure" ]; then
59    DSYS="sx6nec";
60  elif [ "$WSYS" = "ds" ]; then
61    DSYS="sxdkrz";
62  else
63    DSYS="linux";
64  fi;
65elif [ "$USYS" = "MIPS" ]; then
66  DSYS="mips";
67elif [ "$USYS" = "OSF1" ]; then
68  DSYS="osf1";
69elif [ "$USYS" = "SunOS" ]; then
70  WSYS=`uname -r | sed -e "s/\..*//"`
71  if [ "$WSYS" = "5" ]; then
72    WSYS=`uname -r | sed -e "s/.*\.//"`
73    if [   "$WSYS" = 1 \
74        -o "$WSYS" = 2 \
75        -o "$WSYS" = 3 ]; then
76      DSYS="solaris";
77    else
78      DSYS="solaris";
79    fi;
80  else
81    DSYS="sun";
82  fi;
83elif [ "$USYS" = "SUPER-UX" ]; then
84  DSYS="nec";
85elif [ "$USYS" = "ULTRIX" ]; then
86  DSYS="ultrix";
87elif [   "$USYS" = "UNICOS" \
88      -o "$USYS" = "sn4803" \
89      -o "$USYS" = "sn4602" ]; then
90  DSYS="cray";
91elif [ "$USYS" = "UNIX_System_V" ]; then
92  DSYS="fjvpp";
93else
94  WSYS=`uname -m`;
95  if [ "$WSYS" = "CRAY T3E" ]; then
96    DSYS="t3e";
97  else
98    DSYS="Unknown";
99  fi;
100fi;
101#-
102echo "$DSYS";
103#-
104exit 0;
Note: See TracBrowser for help on using the repository browser.