slurm-process: check input files are readable

This commit is contained in:
Starbeamrainbowlabs 2022-11-01 19:03:37 +00:00
parent a69fa9f0f3
commit 79b231198f
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -36,8 +36,17 @@ if [[ -z "${OUTPUT}" ]]; then
exit 1;
fi
if [[ ! -r "${RAINFALL}" ]]; then
echo "Error: That input rainfall file either doesn't exist, isn't a directory, or we don't have permission to access it.";
exit 3;
fi
if [[ ! -r "${WATER}" ]]; then
echo "Error: That input water depth file either doesn't exist, isn't a directory, or we don't have permission to access it.";
exit 3;
fi
if [[ ! -d "${OUTPUT}" ]]; then
echo "Error: That input directory either doesn't exist, isn't a directory, or we don't have permission to access it.";
echo "Error: That output directory either doesn't exist, isn't a directory, or we don't have permission to access it.";
exit 3;
fi