Skip to content

Commit

Permalink
Removes misleading "No such file or directory" syntax errors from out…
Browse files Browse the repository at this point in the history
…put files (#2688)

This PR addresses issue #1252. The following is accomplished:

- Prior to removing files, the existence of a file is checked prior to
attempting to remove; this is performed as noted
[here](#1252 (comment));
this PR only addresses the the `chgrp` issue.

Refs #1252

---------

Co-authored-by: David Huber <[email protected]>
  • Loading branch information
2 people authored and RussTreadon-NOAA committed Jun 24, 2024
1 parent ecc409e commit 50a52dc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/exglobal_diag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,11 @@ EOFdiag
# Restrict diagnostic files containing rstprod data
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}"
fi
done
done

# If requested, create diagnostic file tarballs
Expand Down

0 comments on commit 50a52dc

Please sign in to comment.