diff --git a/install.sh b/install.sh index e17279fe18037f0171d8bcf8ae9808a6f6d4e88b..f4d7103b20d1cf5b40fff25908d567f195274c95 100755 --- a/install.sh +++ b/install.sh @@ -180,17 +180,17 @@ function install_linux() { ## is always bound. We also check for the existence of a few standard ## locations (/scratch /volatile /cache) and bind those too if found echo " - Determining additional bind paths" + BINDPATH=${SINGULARITY_BINDPATH} + echo " --> system bindpath: $BINDPATH" PREFIX_ROOT="/$(realpath $PREFIX | cut -d "/" -f2)" - BINDPATH=$PREFIX_ROOT - echo " --> $PREFIX_ROOT" - for dir in /work /scratch /volatile /cache /gpfs /gpfs01 /gpfs02; do + for dir in /work /scratch /volatile /cache /gpfs /gpfs01 /gpfs02 $PREFIX_ROOT; do ## only add directories once if [[ ${BINDPATH} =~ $(basename $dir) ]]; then continue fi if [ -d $dir ]; then echo " --> $dir" - BINDPATH="${BINDPATH},$dir" + BINDPATH=${dir}${BINDPATH:+,$BINDPATH} fi done @@ -279,7 +279,7 @@ if [ ! -z \${UPGRADE} ]; then fi export ATHENA_PREFIX=$PREFIX/local -export SINGULARITY_BINDPATH=$BINDPATH\${SINGULARITY_BINDPATH:+:\$SINGULARITY_BINDPATH} +export SINGULARITY_BINDPATH=$BINDPATH $SINGULARITY exec $SIF eic-shell \$@ EOF