Author: nickboldt
Date: 2012-10-05 01:08:57 -0400 (Fri, 05 Oct 2012)
New Revision: 44327
Modified:
trunk/build/util/cleanup/jbosstools-cleanup.sh
Log:
use H and B convention when parsing dates
Modified: trunk/build/util/cleanup/jbosstools-cleanup.sh
===================================================================
--- trunk/build/util/cleanup/jbosstools-cleanup.sh 2012-10-05 01:13:59 UTC (rev 44326)
+++ trunk/build/util/cleanup/jbosstools-cleanup.sh 2012-10-05 05:08:57 UTC (rev 44327)
@@ -99,7 +99,7 @@
for dd in $all; do
keep=0;
# sec=$(date -d "$(echo $dd | perl -pe
"s/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/\1-\2-\3\ \4:\5/")" +%s) # convert
buildID (folder) to timestamp, then to # seconds since epoch ## OLD FOLDER FORMAT
- sec=$(date -d "$(echo $dd | perl -pe
"s/(\d{4})-(\d{2})-(\d{2})_(\d{2})-(\d{2})-(\d{2})-H(\d+)/\1-\2-\3\
\4:\5:\6/")" +%s) # convert buildID (folder) to timestamp, then to # seconds
since epoch ## NEW FOLDER FORMAT
+ sec=$(date -d "$(echo $dd | perl -pe
"s/(\d{4})-(\d{2})-(\d{2})_(\d{2})-(\d{2})-(\d{2})-(H|B)(\d+)/\1-\2-\3\
\4:\5:\6/")" +%s) # convert buildID (folder) to timestamp, then to # seconds
since epoch ## NEW FOLDER FORMAT
(( day = now - sec ))
(( day = day / 3600 / 24 ))
for n in $newest; do
Show replies by date