From 70073d2feec3b83d3a82cf0c1719a4209cb03860 Mon Sep 17 00:00:00 2001
From: Jameson Graef Rollins <jameson.rollins@ligo.org>
Date: Mon, 11 May 2020 12:31:12 -0700
Subject: [PATCH] install: move EPICS screen copying code next to EPICS seq
 install

just to keep related things together
---
 install | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/install b/install
index 7b0589bb0..5f949a01c 100755
--- a/install
+++ b/install
@@ -39,7 +39,7 @@ upper_system=`echo $system | tr a-z A-Z`
 targetcpu=`grep TARGET_CPU src/include/${system}.h | head -1 | awk '{print $3}'`
 cur_date=`date +%y%m%d_%H%M%S`
 
-RTCDS=$RTCDS
+RTCDS=/opt/rtcds/${site,,*}/${ifo,,*}
 TARGET=$RTCDS/target/${system}
 ARCHIVE=$RTCDS/target_archive/${system}/${system}_$cur_date
 
@@ -86,6 +86,19 @@ fi
 
 ##########
 
+echo "Installing EPICS screens..."
+
+if test -e $RTCDS/medm/${system}; then
+    mkdir -p $RTCDS/medm/archive
+    cp -a $RTCDS/medm/${system} $RTCDS/medm/archive/${system}_${cur_date} || exit 1
+fi
+
+mkdir -p $RTCDS/medm/${system}
+(cd build/${system}epics/medm; find . -name "*.adl" | xargs cp --parents -r -t $RTCDS/medm/${system};)
+(cd build/${system}epics/medm; find . -name "*.ui" | xargs cp --parents -r -t $RTCDS/medm/${system};)
+
+##########
+
 echo "Installing RT components..."
 
 if test -e $TARGET/bin/${system}.ko; then
@@ -177,15 +190,7 @@ if [ x$gds_node != "x" ]; then
     #echo $RTCDS/chans/daq/${edcu_name}.ini
 fi
 
-echo Installing Epics MEDM screens
-
-mkdir -p $RTCDS/medm/archive
-if test -e $RTCDS/medm/${system}; then
-    cp -a $RTCDS/medm/${system} $RTCDS/medm/archive/${system}_${cur_date} || exit 1
-fi
-mkdir -p $RTCDS/medm/${system}
-(cd build/${system}epics/medm; find . -name "*.adl" | xargs cp --parents -r -t $RTCDS/medm/${system};)
-(cd build/${system}epics/medm; find . -name "*.ui" | xargs cp --parents -r -t $RTCDS/medm/${system};)
+##########
 
 if [ -e $srcdir/src/epics/util/post_build_script.py ]; then
     echo "Running post-build script..."
-- 
GitLab