Simple shell script to return the architecture. It is to be used on
test problems which produce slightly different results on different platforms.
This commit is contained in:
parent
9420d9544c
commit
8a622ee2a3
1 changed files with 64 additions and 0 deletions
64
bin/get_arch
Executable file
64
bin/get_arch
Executable file
|
|
@ -0,0 +1,64 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# get the architecture from the current environment
|
||||
# Return a single word that is used to identifiy
|
||||
# the architecture tree under which machine specific
|
||||
# binaries, libraries, and include files are storred.
|
||||
#
|
||||
# (obviously this needs to be worked on!)
|
||||
#
|
||||
#
|
||||
uac=`uname -a`
|
||||
usc=`uname -s`
|
||||
|
||||
ua=`echo $uac | tr [A-Z] [a-z]`
|
||||
us=`echo $usc | tr [A-Z] [a-z]`
|
||||
|
||||
if [ "$us" = "hp-ux" ]
|
||||
then
|
||||
echo hpux_pa2.0
|
||||
exit 1
|
||||
fi
|
||||
if [ "$us" = "sunos" ]
|
||||
then
|
||||
echo sol
|
||||
exit 1
|
||||
fi
|
||||
if [ "$us" = "irix64" ]
|
||||
then
|
||||
echo sgi10k
|
||||
exit 1
|
||||
fi
|
||||
if [ "$us" = "tflops o/s" ]
|
||||
then
|
||||
echo tflop
|
||||
exit 1
|
||||
fi
|
||||
if [ "$us" = "osf1" ]
|
||||
then
|
||||
echo true64
|
||||
exit 1
|
||||
fi
|
||||
if [ "$us" = "linux" ]
|
||||
then
|
||||
um=`uname -m`
|
||||
if [ "$um" = "alpha" ]
|
||||
then
|
||||
echo linux-alpha
|
||||
exit 1
|
||||
fi
|
||||
if [ "$um" = "i686" ]
|
||||
then
|
||||
echo linux
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [ "$us" = "darwin" ]
|
||||
then
|
||||
echo darwin
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo unknown
|
||||
exit 0
|
||||
Loading…
Add table
Reference in a new issue