From 3078cf1256dd7499b3bf8ed842408dfecc454ad9 Mon Sep 17 00:00:00 2001
From: Robert Izzard <r.izzard@surrey.ac.uk>
Date: Tue, 2 Aug 2022 16:45:23 +0100
Subject: [PATCH] add env var check in install script

---
 install.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/install.sh b/install.sh
index f3204fd55..aa32f8683 100755
--- a/install.sh
+++ b/install.sh
@@ -5,6 +5,12 @@
 VERSION_NUMBER=$(cat "VERSION")
 echo "installing binarcpython version $VERSION_NUMBER"
 
+# check the BINARY_C environment variable is defined
+if [[ -z "${BINARY_C}" ]]; then
+    echo "Error: The BINARY_C environment variable is not defined. This should point to the directory of your binary_c installation. Please set it and try again."
+    exit
+fi
+
 # we can only use python3 and python3, but allow
 # the user to set these in environment variables
 # PYTHON and PIP.
-- 
GitLab