From 7d392fe278c3b1b83ee204bdf6662ceb514cbcfd Mon Sep 17 00:00:00 2001 From: Matthew K Defenderfer <mdefende@uab.edu> Date: Mon, 16 Sep 2024 11:28:06 -0500 Subject: [PATCH] add more braces --- src/run-policy/run-mmpol.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/run-policy/run-mmpol.sh b/src/run-policy/run-mmpol.sh index 7db47ad..13cd12b 100755 --- a/src/run-policy/run-mmpol.sh +++ b/src/run-policy/run-mmpol.sh @@ -20,7 +20,7 @@ dry_run=false usage() { >&2 cat << EOF -Usage: $0 [ -h ] [ -o | --outdir ] [ -f | --output-prefix ] [-P | --policy-file] device +Usage: $0 [ -h ] [ -o | --outdir ] [ -f | --output-prefix ] [ -P | --policy-file] device EOF exit 1 } @@ -84,33 +84,33 @@ fi device="$1" # Ensure device is specified -if [[ -z "$device" ]]; then +if [[ -z "${device}" ]]; then echo "Error: Specify either the name of a fileset or a directory path" usage fi # set default output_log_prefix if not specified in the arguments -if [[ -z "$output_log_prefix" ]]; then - modified_device=$(echo "$device" | sed -e 's|^/||' -e 's|/$||' -e 's|/|-|g') +if [[ -z "${output_log_prefix}" ]]; then + modified_device=$(echo "${device}" | sed -e 's|^/||' -e 's|/$||' -e 's|/|-|g') output_log_prefix="list-policy_${modified_device}" fi # create temporary working directory for list aggregation -tmpglobal=$outdir/slurm-tmp-${SLURM_JOBID} -tmpscratch=$outdir/slurm-tmp-${SLURM_JOBID} +tmpglobal=${outdir}/slurm-tmp-${SLURM_JOBID} +tmpscratch=${outdir}/slurm-tmp-${SLURM_JOBID} nodes=`scontrol show hostnames "${SLURM_JOB_NODELIST}" | tr '\n' ',' | sed -e 's/,$//'` cores="${SLURM_CPUS_PER_TASK}" -DATESTR=`date +'%Y%m%dT%H%M%S'` +DATESTR=$(date +'%Y%m%dT%H%M%S') -policy=`basename $policy_file` +policy=$(basename ${policy_file}) filetag="${policy}_slurm-${SLURM_JOBID}_${DATESTR}" cmd="mmapplypolicy ${device} -I defer \ - -P $policy_file \ - -g $tmpglobal \ - -s $tmpscratch \ + -P ${policy_file} \ + -g ${tmpglobal} \ + -s ${tmpscratch} \ -f ${outdir}/list-${SLURM_JOBID} \ -M FILEPATH=${device} \ -M JOBID=${SLURM_JOBID} \ -- GitLab