-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpcxarch
executable file
·60 lines (58 loc) · 1.58 KB
/
pcxarch
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! /bin/csh -f
#
# pcxarch - Returns the machine's PCx environmental variable, PCx_ARCH.
#
# This file was copied from the PETSc package
# http://www.mcs.anl.gov/petsc/petsc.html
if (-e /usr/bin/uname) then
set LARCH = `/usr/bin/uname -s`
if ("$LARCH" == "AIX") then
set LARCH = "rs6000"
else if ("$LARCH" == "HP-UX") then
set LARCH = "hpux"
else if ("$LARCH" == "Linux") then
set LARCH = "linux"
else if ("$LARCH" == "FreeBSD") then
set LARCH = "freebsd"
else if ("$LARCH" != "IRIX" && "$LARCH" != "IRIX64") then
set LARCH = `/usr/bin/uname -m`
endif
else if (-e /usr/bin/uname) then
set LARCH = `/usr/bin/uname`
if ("$LARCH" == "FreeBSD") then
set LARCH = "freebsd"
else
echo "Unable to determine machines architecture"
set LARCH = "unknown"
endif
else
echo "Unable to determine machines architecture"
set LARCH = "unknown"
endif
set SunOSTest = `expr "$LARCH" : "\(....\)"`
if ("$SunOSTest" == "sun4") then
set LARCH = sun4
set Version = `/usr/bin/uname -r`
set MajorVersion = `expr "$Version" : "\(.\)"`
if ("$MajorVersion" == 5) then
set LARCH = "solaris"
endif
else if ("$LARCH" == "AIX") then
set LARCH = "rs6000"
else if ("$LARCH" == "RIOS") then
set LARCH = "rs6000"
else if ("$LARCH" == "sun4m") then
set LARCH = "sun4"
else if ("$LARCH" == "iris4d") then
set LARCH = "IRIX"
else if ("$LARCH" == "Linux" ) then
set LARCH = "linux"
else if ("$LARCH" == "CRAY Y-MP" ) then
set LARCH = "t3d"
else if ("$LARCH" == "Darwin" ) then
set LARCH = "darwin"
endif
#
echo $LARCH
exit 0
w