Skip to content

Commit

Permalink
Raise error if -t set to outside of local
Browse files Browse the repository at this point in the history
  • Loading branch information
khoffschlag committed Mar 1, 2024
1 parent 9edae96 commit 262c892
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/cluster-pipeline-executor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ while getopts 'i:o:t:l:p:r:m:n:b:d:c:s:h' opt; do
?|h)
echo "-i Input BIDS dataset"
echo "-o Derivatives dir (i.e., where to store the results)"
echo "-t Where to store temporary PUMI workflow files on the cluster (MUST BE SOMEWHERE IN /local !)"
echo "-t Where to store temporary PUMI workflow files on the worker nodes (MUST BE an absolute path somewhere in /local/)"
echo "-l NFS directory that should be used to store the Slurm log files (+ Apptainer SIF file)"
echo "-p PUMI pipeline you want to run (default: '${PIPELINE}')"
echo "-r Nipype plugin params to limit resource usage (default: '${RESOURCES}')"
Expand Down Expand Up @@ -68,6 +68,11 @@ if [ -z "${INDIR}" ] || [ -z "${OUTDIR}" ] || [ -z "${TMP_PUMI}" ] || [ -z "${LO
exit 1
fi

if [[ "${TMP_PUMI}" != "/local/*" ]]; then
echo "Error: -t must be set to a sub-directory in /local/"
exit 1
fi

############################# Main script begins here #########################################

dataset_name=$(basename "$INDIR")
Expand Down

0 comments on commit 262c892

Please sign in to comment.