From e15e5b866a41e5eae9a05b01fa15276ce3445520 Mon Sep 17 00:00:00 2001
From: Jameson Graef Rollins <jameson.rollins@ligo.org>
Date: Mon, 23 Dec 2019 15:12:32 -0800
Subject: [PATCH] cli: require version string

---
 support/bin/rtcds.in | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/support/bin/rtcds.in b/support/bin/rtcds.in
index 9650c8a18..1fcc99643 100755
--- a/support/bin/rtcds.in
+++ b/support/bin/rtcds.in
@@ -1,6 +1,14 @@
 #!/bin/bash -e
 
+log() {
+    echo "$@" >&2
+}
+
 RTS_VERSION=${RTS_VERSION:-__VERSION__}
+if [[ "$RTS_VERSION" =~ ._VERSION_. ]] ; then
+    log "RTS_VERSION variable not set."
+    exit 1
+fi
 
 # this should define all USER_VARS (see below)
 ENV_FILE=${RTS_ENV:-/etc/advligorts/env}
@@ -31,10 +39,6 @@ EXPORT_VARS=(${USER_VARS[@]} site ifo CDS_SRC CDS_IFO_SRC)
 
 ##################################################
 
-log() {
-    echo "$@" >&2
-}
-
 check_env() {
     for var in ${USER_VARS[*]} ; do
 	if [ ! "${!var}" ] ; then
-- 
GitLab