From ba0c250420bef83c0a2f4d98381d38d724eca9df Mon Sep 17 00:00:00 2001
From: Jeong Han Lee <jeonghan.lee@gmail.com>
Date: Mon, 9 Oct 2017 18:33:53 +0200
Subject: [PATCH] add comment on iocsh

---
 iocsh.bash | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/iocsh.bash b/iocsh.bash
index 534d0966..174f3761 100755
--- a/iocsh.bash
+++ b/iocsh.bash
@@ -6,6 +6,7 @@ declare -gr SC_SCRIPTNAME=${0##*/}
 declare -gr SC_TOP="$(dirname "$SC_SCRIPT")"
 declare -g  STARTUP=""
 
+
 set -a
 . ${SC_TOP}/ess-env.conf
 set +a
@@ -30,6 +31,7 @@ esac
 
 # Default, use the default EPICS_BASE in env setup script
 # echo ${EPICS_BASE}
+# What about EPICS_BASE exists, however, require doesn't compile with that base...?
 
 
 if [[ $(checkIfDir ${EPICS_BASE}) -eq "$NON_EXIST" ]]; then
@@ -40,23 +42,14 @@ if [[ $(checkIfDir ${EPICS_BASE}) -eq "$NON_EXIST" ]]; then
     exit;
 fi
 
-
-## Extract selected EPICS BASE version from the active
-## environment 
-
 declare -g RUNNING_EPICS_BASE_VER=${EPICS_BASE##*/*-}
 declare -g RUNNING_REQUIRE_PATH=${EPICS_MODULES}/${REQUIRE}/${REQUIRE_VERSION}/R${RUNNING_EPICS_BASE_VER}
 
-# EPICS_BASE/bin should be in PATH
-
 declare -g SOFTIOC_CMD="softIoc"
 declare -g SOFTIOC_ARGS="-D ${EPICS_BASE}/dbd/softIoc.dbd"
 
-IOC=$(hostname|tr -d '\r')
-
 STARTUP=/tmp/${SC_SCRIPTNAME}_${IOC}_startup.$BASHPID
 
-
 trap "softIoc_end" EXIT SIGTERM
 
 {
@@ -77,7 +70,6 @@ trap "softIoc_end" EXIT SIGTERM
 
     LDCMD="dlload"
 
-
     echo "$LDCMD $REQUIRE_LIB"
     echo "dbLoadDatabase $REQUIRE_DBD"
     echo "${REQUIRE%-*}_registerRecordDeviceDriver"
@@ -88,6 +80,8 @@ trap "softIoc_end" EXIT SIGTERM
     then
 	echo "iocInit"
     fi
+
+    
 } > ${STARTUP}
 
 
-- 
GitLab