Skip to content

Commit

Permalink
allow for interactive base in environment script
Browse files Browse the repository at this point in the history
  • Loading branch information
tomeichlersmith committed Jul 2, 2021
1 parent ce0688e commit 7eb6e89
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ldmx-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ export LDMX_ENV_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &>/dev/null && pwd
export TMPDIR=/export/scratch/users/$USER
mkdir -p $TMPDIR

# This is the full path to the directory containing ldmx-sw
# This is the full path to the directory containing ldmx-sw on local
_base="$( cd "${LDMX_ENV_DIR}/../" &>/dev/null && pwd)"

# Check for /export/scratch copy for working on interactive node
_interactive_base="/export/scratch/users/$USER/ldmx"
if [[ -d ${_interactive_base}/ldmx-sw ]]; then
_base="${_interactive_base}"
fi

# define cache location
export SINGULARITY_CACHEDIR=$_base/.singularity

Expand Down

0 comments on commit 7eb6e89

Please sign in to comment.