Commit 8da81e1c authored by Bogdan Vacaliuc's avatar Bogdan Vacaliuc
Browse files

fix syntax error on ppid assignment

- discovered by shellcheck
+ applied SC2086 suggestions
parent 0e2dd326
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -90,11 +90,11 @@ args=("$PROFILE_ENV" "--classic" "-m" "mantidprofiler")
# shellcheck disable=SC2206 # do not break the array into a single string
args+=(${PROFILE_OPT[@]})
args+=("${pid}")
nsd-conda-wrap.sh "${args[@]}" > ${PTMP} & ppid=$i
nsd-conda-wrap.sh "${args[@]}" > "${PTMP}" & ppid=$!
echo "Writing profile output to ${PTMP}"
trap 'set -x ; kill -HUP $pid $ppid' SIGINT

# follow output from main app and cleanup
tail -f ${TMP} --pid $pid
wait -n $ppid && echo "Wrote ${PROFILE_OUT}"
tail -f "${TMP}" --pid $pid
wait -n "$ppid" && echo "Wrote ${PROFILE_OUT}"
trap - EXIT