From ee5cf7f8dd4e4d206c0ea05dd7ab294d53168cb7 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wouter.deconinck@umanitoba.ca>
Date: Tue, 5 Oct 2021 19:50:10 +0000
Subject: [PATCH] If SINGULARITY_BINDPATH already set, just add to it

(cherry picked from commit 70e2ac5fc0b58f516c95fa49c5500168ca384a59)
---
 install.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/install.sh b/install.sh
index 1de24d8c8..e17279fe1 100755
--- a/install.sh
+++ b/install.sh
@@ -183,7 +183,7 @@ function install_linux() {
   PREFIX_ROOT="/$(realpath $PREFIX | cut -d "/" -f2)"
   BINDPATH=$PREFIX_ROOT
   echo "   --> $PREFIX_ROOT"
-  for dir in /work /scratch /volatile /cache; do
+  for dir in /work /scratch /volatile /cache /gpfs /gpfs01 /gpfs02; do
     ## only add directories once
     if [[ ${BINDPATH} =~ $(basename $dir) ]]; then
       continue
@@ -279,7 +279,7 @@ if [ ! -z \${UPGRADE} ]; then
 fi
 
 export ATHENA_PREFIX=$PREFIX/local
-export SINGULARITY_BINDPATH=$BINDPATH
+export SINGULARITY_BINDPATH=$BINDPATH\${SINGULARITY_BINDPATH:+:\$SINGULARITY_BINDPATH}
 $SINGULARITY exec $SIF eic-shell \$@
 EOF
 
-- 
GitLab