From d89ee815408f8798d3c660b3513086483d937515 Mon Sep 17 00:00:00 2001 From: Sylvester Joosten <sylvester.joosten@gmail.com> Date: Tue, 6 Jul 2021 19:43:34 +0000 Subject: [PATCH] Update install.sh --- install.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 87ae8199a..c8bfeeb1a 100755 --- a/install.sh +++ b/install.sh @@ -8,6 +8,8 @@ function print_the_help { echo "USAGE: ./install.sh [-p PREFIX] [-v VERSION]" echo "OPTIONAL ARGUMENTS:" echo " -p,--prefix Working directory to deploy the environment (D: $PREFIX)" + echo " -t,--tmpdir Change tmp directory (D: $([[ -z "$TMPDIR" ]] && echo "/tmp" || echo "$TMPDIR"))" + echo " -n,--no-cvmfs Disable check for local CVMFS (D: enabled)" echo " -v,--version Version to install (D: $VERSION)" echo " -h,--help Print this message" echo "" @@ -25,6 +27,16 @@ while [ $# -gt 0 ]; do shift shift ;; + -t|--tmpdir) + export TMPDIR=$2 + export SINGULARITY_TMPDIR=$2 + shift + shift + ;; + -n|--no-cvmfs) + DISABLE_CVMFS_USAGE=true + shift + ;; -v|--version) VERSION=$2 shift @@ -115,7 +127,7 @@ if [ ${SINGULARITY_VERSION:0:1} = 2 ]; then else ## check if we can just use cvmfs for the image SIF="$PREFIX/local/lib/${CONTAINER}-${VERSION}.sif" - if [ -d /cvmfs/singularity.opensciencegrid.org/eicweb/${CONTAINER}:${VERSION} ]; then + if [ -z "$DISABLE_CVMFS_USAGE" -a -d /cvmfs/singularity.opensciencegrid.org/eicweb/${CONTAINER}:${VERSION} ]; then SIF="$PREFIX/local/lib/${CONTAINER}-${VERSION}" ## need to cleanup in this case, else it will try to make a subdirectory rm -rf ${SIF} -- GitLab