From 8a622ee2a326b431d8dd8b7fb37abd4cad571897 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Thu, 5 Aug 2004 21:32:57 +0000 Subject: [PATCH] Simple shell script to return the architecture. It is to be used on test problems which produce slightly different results on different platforms. --- bin/get_arch | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 bin/get_arch diff --git a/bin/get_arch b/bin/get_arch new file mode 100755 index 000000000..f00e833ac --- /dev/null +++ b/bin/get_arch @@ -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