From 8f77f269c1f2306b78c30bbab731882635da40b7 Mon Sep 17 00:00:00 2001 From: zimoch Date: Mon, 9 Jan 2012 14:08:08 +0000 Subject: [PATCH] check for missing EPICS_HOST_ARCH --- iocsh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/iocsh b/iocsh index 4273ad2..7b052d1 100755 --- a/iocsh +++ b/iocsh @@ -1,7 +1,7 @@ #!/bin/bash SOURCE='$Source: /cvs/G/DRV/misc/iocsh,v $' -REVISION='$Revision: 3.1 $' -DATE='$Date: 2011/12/20 16:22:39 $' +REVISION='$Revision: 3.2 $' +DATE='$Date: 2012/01/09 14:08:08 $' rp() { ( realpath $1 || readlink -f $1 || readlink $1 || echo $1 ) 2>/dev/null @@ -92,6 +92,18 @@ then fi export IOC +if [ -z "$EPICS_HOST_ARCH" ] +then + echo "EPICS_HOST_ARCH is not set" + EPICS_HOST_ARCH=$(basename $(dirname $(rp $(which caRepeater)))) + if [ -n "$EPICS_HOST_ARCH" ] + then + echo "Guessing $EPICS_HOST_ARCH" + else + exit 1 + fi +fi + # setup search path for require ODIR=O.${BASE}_$EPICS_HOST_ARCH EPICS_DRIVER_PATH=.:bin:snl:../snl:$ODIR:src/$ODIR:snl/$ODIR:../snl/$ODIR:${EPICS_DRIVER_PATH#:}