[Dart-dev] [6309] DART/trunk/models/CESM/shell_scripts/st_archive.sh: remove unintentional .
nancy at ucar.edu
nancy at ucar.edu
Tue Jul 16 09:33:39 MDT 2013
Revision: 6309
Author: nancy
Date: 2013-07-16 09:33:38 -0600 (Tue, 16 Jul 2013)
Log Message:
-----------
remove unintentional . in a rm statement; save only time 00000
on days 1, 10, 20; remove the rest/yyyy-mm-dd-sssss dir as well
as the contents; touch an empty file to indicate this dir was
removed on purpose.
Modified Paths:
--------------
DART/trunk/models/CESM/shell_scripts/st_archive.sh
-------------- next part --------------
Modified: DART/trunk/models/CESM/shell_scripts/st_archive.sh
===================================================================
--- DART/trunk/models/CESM/shell_scripts/st_archive.sh 2013-07-15 22:41:05 UTC (rev 6308)
+++ DART/trunk/models/CESM/shell_scripts/st_archive.sh 2013-07-16 15:33:38 UTC (rev 6309)
@@ -341,11 +341,12 @@
# if you want to save more often (or less) alter the test here.
# using the time variables immediately above.
-if [[ $day == 01 || $day == 10 || $day == 20 ]]; then
+if [[ $secs == 00000 && ($day == 01 || $day == 10 || $day == 20) ]]; then
echo "st_archive: PRESERVING contents of restart ${dname}"
else
echo "st_archive: DELETING contents of restart ${dname}"
- rm -rf ${sta}/rest/${dname}/* .
+ rm -rf ${sta}/rest/${dname}
+ touch ${sta}/rest/${dname}_removed
fi
#ALICIA... rm the .hv files because they have no unique time stamp.
More information about the Dart-dev
mailing list