Skip to content
Merged
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions scripts/exglobal_diag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,12 @@ EOFdiag
rlist="conv_gps conv_ps conv_pw conv_q conv_sst conv_t conv_uv saphir"
for rtype in $rlist; do
set +e
${CHGRP_CMD} *${rtype}*
${STRICT_ON:-set -e}
for rfile in *"${rtype}"*; do
if [[ -s "${rfile}" ]]; then
${CHGRP_CMD} "${rfile}"
${STRICT_ON:-set -e}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be out of the for loop.
If there are no files that match the *"${rtype}" or if the if condition is not satisfied, set +e will prevail at the end of the for loop. set -e should be set there based on how it is in develop.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we are checking for the file's existence, I'm not sure set +e is needed anymore at all.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please confirm that my update makes the correction(s) that both of you are suggesting.

fi
done
Comment thread
HenryRWinterbottom marked this conversation as resolved.
done

# If requested, create diagnostic file tarballs
Expand Down