Skip to content
Snippets Groups Projects
Commit d89ee815 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Update install.sh

parent 1d0f1b6d
No related branches found
No related tags found
1 merge request!96Resolve "Optionally disable /cvmfs detection for the installer"
......@@ -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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment