-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replaces sleep
with wait_for_file
#2533
Replaces sleep
with wait_for_file
#2533
Conversation
ush/gfs_bufr.sh
Outdated
exit 2 | ||
fi | ||
done | ||
if ! -f wait_for_file "${COM_ATMOS_HISTORY}/${RUN}.${cycle}.atm.logf${hh3}.${logfm}" "${sleep_interval}" "1000"; then |
Check warning
Code scanning / shellcheck
This flag is used as a command name. Bad line break or missing [ .. ]?
ush/gfs_bufr_netcdf.sh
Outdated
fi | ||
done | ||
sleep_interval=10 | ||
if ! -f wait_for_file "${COMIN}/${RUN}.${cycle}.logf${hh2}.txt" "${sleep_interval}" "1000"; then |
Check warning
Code scanning / shellcheck
This flag is used as a command name. Bad line break or missing [ .. ]?
scripts/exgfs_atmos_grib_awips.sh
Outdated
done | ||
|
||
sleep_interval=10 | ||
if [[ ! -s wait_for_file "${COM_ATMOS_GRIB_0p25}/${RUN}.${cycle}.pgrb2b.0p25.f${fcsthrs}.idx" "${sleep_interval}" "1000" ]]; then |
Check notice
Code scanning / shellcheck
The mentioned syntax error was in this if expression.
scripts/exgfs_atmos_grib_awips.sh
Outdated
done | ||
|
||
sleep_interval=10 | ||
if [[ ! -s wait_for_file "${COM_ATMOS_GRIB_0p25}/${RUN}.${cycle}.pgrb2b.0p25.f${fcsthrs}.idx" "${sleep_interval}" "1000" ]]; then |
Check failure
Code scanning / shellcheck
Couldn't parse this test expression. Fix to allow more checks.
scripts/exgfs_atmos_grib_awips.sh
Outdated
done | ||
|
||
sleep_interval=10 | ||
if [[ ! -s wait_for_file "${COM_ATMOS_GRIB_0p25}/${RUN}.${cycle}.pgrb2b.0p25.f${fcsthrs}.idx" "${sleep_interval}" "1000" ]]; then |
Check failure
Code scanning / shellcheck
Expected test to end here (don't wrap commands in []/[[]]). Fix any mentioned problems and try again.
scripts/exgfs_wave_nawips.sh
Outdated
err=1;export err;${errchk} || exit ${err} | ||
fi | ||
done | ||
if [[ ! -s wait_for_file "${GRIBIN}" 20 "${maxtries}" ]]; then |
Check notice
Code scanning / shellcheck
The mentioned syntax error was in this if expression.
scripts/exgfs_wave_nawips.sh
Outdated
err=1;export err;${errchk} || exit ${err} | ||
fi | ||
done | ||
if [[ ! -s wait_for_file "${GRIBIN}" 20 "${maxtries}" ]]; then |
Check failure
Code scanning / shellcheck
Couldn't parse this test expression. Fix to allow more checks.
ush/wave_tar.sh
Outdated
echo "Making TAR FILE" | ||
|
||
alertName=$(echo $RUN|tr [a-z] [A-Z]) | ||
alertName=$(echo "${RUN}"|tr "[a-z]" "[A-Z]") |
Check notice
Code scanning / shellcheck
Don't use [] around classes in tr, it replaces literal square brackets.
ush/wave_tar.sh
Outdated
echo "Making TAR FILE" | ||
|
||
alertName=$(echo $RUN|tr [a-z] [A-Z]) | ||
alertName=$(echo "${RUN}"|tr "[a-z]" "[A-Z]") |
Check notice
Code scanning / shellcheck
Don't use [] around classes in tr, it replaces literal square brackets.
ush/wave_tar.sh
Outdated
then | ||
tardone='yes' | ||
fi | ||
if -f wait_for_file "${ID}.${cycle}.${type}_tar" "${sleep_interval}" "1000"; then |
Check warning
Code scanning / shellcheck
This flag is used as a command name. Bad line break or missing [ .. ]?
ush/wave_tar.sh
Outdated
tardone='yes' | ||
fi | ||
if -f wait_for_file "${ID}.${cycle}.${type}_tar" "${sleep_interval}" "1000"; then | ||
tardone='yes' |
Check warning
Code scanning / shellcheck
tardone appears unused. Verify use (or export if used externally).
Please do not review until all shellnorm exceptions have been addressed. |
You shouldn't be using |
@WalterKolczynski-NOAA I hadn't been until the linter started complaining. For example, from
These are littered throughout the shell linter tests. How did you resolve this? |
There shouldn't be any square bracket. |
I understand that. This is the statement in my bash script that is raising the exception:
|
79480b4
to
762f040
Compare
Description
This PR addresses issue #2444. The following is accomplished:
sleep
statements are replaced withwait_for_file
for the relevant scripts beneathscripts
andush
;Note: The WAFS scripts are not updated as per @aerorahul direction.
Resolves #2444
Type of change
Change characteristics
How has this been tested?
The following CI tests were executed for RDHPCS Hera:
C48_ATM
C96_atm3DVar
C48_S2SW
The remaining configurations will be evaluated via the full CI/CD tests.
Checklist