Skip to content
Snippets Groups Projects
Commit 40d828bf authored by Jameson Rollins's avatar Jameson Rollins
Browse files

support: check SITE/IFO vars and export TARGET in epics wrapper script

parent 3e9eb484
No related branches found
No related tags found
1 merge request!112support: update wrapper scripts to check SITE/IFO and export TARGET vars
...@@ -2,11 +2,19 @@ ...@@ -2,11 +2,19 @@
. /etc/advligorts/env . /etc/advligorts/env
sys="$1" sys="$1"
if [ -z "$sys" ] ; then if [ -z "$sys" ] ; then
echo "usage: $(basename $0) <sys>" echo "usage: $(basename $0) <sys>" >&2
exit 1 exit 1
fi fi
if [ -z "$SITE" ] ; then
echo "SITE variable not specified." >&2
exit 2
fi
if [ -z "$IFO" ] ; then
echo "IFO variable not specified." >&2
exit 2
fi
export EPICS_DB_INCLUDE_PATH=/usr/lib/epics/dbd export EPICS_DB_INCLUDE_PATH=/usr/lib/epics/dbd
TARGET=/opt/rtcds/${SITE,,*}/${IFO,,*} export TARGET=/opt/rtcds/${SITE,,*}/${IFO,,*}
ETARGET=${TARGET}/target/${sys}/${sys}epics ETARGET=${TARGET}/target/${sys}/${sys}epics
cd ${ETARGET} cd ${ETARGET}
exec ./${sys}epics ${sys}epics${IFO}.cmd exec ./${sys}epics ${sys}epics${IFO}.cmd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment