From 6c22e58d6aa4c372df4ed8285770a3bce5f04043 Mon Sep 17 00:00:00 2001
From: Robert Martin-Legene <robert@nic.ar>
Date: Thu, 28 Jun 2018 13:33:03 -0300
Subject: [PATCH] Introducing BFAHOME

---
 bin/env         | 1 +
 bin/explorer.sh | 6 ++++++
 2 files changed, 7 insertions(+)
 create mode 100644 bin/env

diff --git a/bin/env b/bin/env
new file mode 100644
index 0000000..aa53f72
--- /dev/null
+++ b/bin/env
@@ -0,0 +1 @@
+export BFAHOME=${HOME}/bfa
diff --git a/bin/explorer.sh b/bin/explorer.sh
index d1a3763..f59d45a 100755
--- a/bin/explorer.sh
+++ b/bin/explorer.sh
@@ -1,6 +1,12 @@
 #!/bin/bash
 # 20180619 Robert Martin-Legene <robert@nic.ar>
 
+if [ ! -d "${BFAHOME}" ]
+then
+    echo "\$BFAHOME does not point to a directory. Did you source \$BFAHOME/bin/env ?" >&2
+    exit 1
+fi
+
 trap "echo Argh;exit 1" ERR
 rpcport=8545
 
-- 
GitLab