diff --git a/install.sh b/install.sh index 87ae8199ac6eb7aeb2811d379c4c85755ef08d09..c8bfeeb1ab8791c3b6312f94921c1cfe1f1b591c 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}