Merge commit 'awips2_OB12.1.1_Omaha'

Former-commit-id: 2783331dd6 [formerly 2783331dd6 [formerly b1bce76fd8170d05e57624f969e5293c1257c533]]
Former-commit-id: 1909537682
Former-commit-id: 3c3eebfd0e
This commit is contained in:
Steve Harris 2012-02-15 15:45:23 -06:00
commit 1771876628
10 changed files with 205 additions and 293 deletions

4
.gitignore vendored
View file

@ -5,4 +5,6 @@ test-bin/
testbin/
testBin/
bin-test/
*.class
*.pyo
*.o

View file

@ -98,6 +98,15 @@
</if>
</sequential>
</for>
<if>
<available file="${basedir}/tmp" type="dir" />
<then>
<delete quiet="true" includeemptydirs="true">
<fileset dir="${basedir}/tmp" />
</delete>
</then>
</if>
</target>
<target name="cleanup">

View file

@ -1,87 +0,0 @@
## Core includes file generated on 2012-01-20 17:08:45 GMT
com.raytheon.edex.rpgenvdata/component-deploy.xml
com.raytheon.uf.common.jms/component-deploy.xml
com.raytheon.uf.edex.database/component-deploy.xml
com.raytheon.uf.common.cache/component-deploy.xml
com.raytheon.uf.edex.pointdata/component-deploy.xml
com.raytheon.uf.edex.esb.camel.launcher/component-deploy.xml
com.raytheon.uf.common.dissemination/component-deploy.xml
com.raytheon.uf.edex.bufrtools/component-deploy.xml
com.raytheon.edex.uengine/component-deploy.xml
com.raytheon.uf.common.pointdata/component-deploy.xml
com.raytheon.uf.common.serialization/component-deploy.xml
com.raytheon.uf.common.datastorage.remote/component-deploy.xml
com.raytheon.uf.common.awipstools/component-deploy.xml
com.raytheon.edex.ingestsrv/component-deploy.xml
com.raytheon.uf.common.alertviz/component-deploy.xml
com.raytheon.uf.common.serialization.comm/component-deploy.xml
com.raytheon.uf.tools.gfesuite.servicebackup/component-deploy.xml
com.raytheon.uf.common.auth/component-deploy.xml
com.raytheon.uf.common.menus/component-deploy.xml
com.raytheon.uf.edex.distribution/component-deploy.xml
com.raytheon.uf.common.hydro/component-deploy.xml
com.raytheon.uf.edex.core/component-deploy.xml
com.raytheon.edex.common/component-deploy.xml
com.raytheon.uf.edex.management/component-deploy.xml
com.raytheon.uf.common.datastorage.hdf5/component-deploy.xml
com.raytheon.uf.edex.cpgsrv/component-deploy.xml
com.raytheon.uf.edex.python.decoder/component-deploy.xml
gov.noaa.nws.ncep.edex.uengine/component-deploy.xml
com.raytheon.uf.common.status/component-deploy.xml
com.raytheon.uf.common.sounding/component-deploy.xml
com.raytheon.edex.autobldsrv/component-deploy.xml
gov.noaa.nws.ncep.edex.ingest.util/component-deploy.xml
com.raytheon.uf.common.climo/component-deploy.xml
com.raytheon.uf.common.localization/component-deploy.xml
gov.noaa.nws.ncep.common/component-deploy.xml
com.raytheon.uf.common.message/component-deploy.xml
com.raytheon.rcm.lib/component-deploy.xml
com.raytheon.uf.common.datastorage/component-deploy.xml
com.raytheon.uf.common.topo/component-deploy.xml
com.raytheon.edex.notifysrv/component-deploy.xml
gov.noaa.nws.ncep.edex.gempak.jna/component-deploy.xml
com.raytheon.edex.utilitysrv/component-deploy.xml
com.raytheon.uf.common.geospatial/component-deploy.xml
com.raytheon.uf.common.python/component-deploy.xml
gov.noaa.nws.ncep.edex.purgeutil/component-deploy.xml
com.raytheon.uf.edex.metartohmdbsrv/component-deploy.xml
com.raytheon.uf.common.time/component-deploy.xml
com.raytheon.uf.common.pypies/component-deploy.xml
com.raytheon.uf.common.monitor/component-deploy.xml
com.raytheon.uf.common.comm/component-deploy.xml
com.raytheon.edex.productsrv/component-deploy.xml
com.raytheon.uf.common.mpe/component-deploy.xml
com.raytheon.edex.adaptersrv/component-deploy.xml
com.raytheon.uf.edex.textdbsrv/component-deploy.xml
com.raytheon.uf.common.util/component-deploy.xml
com.raytheon.uf.edex.dat.utils/component-deploy.xml
com.raytheon.uf.common.ohd/component-deploy.xml
com.raytheon.uf.common.site/component-deploy.xml
gov.noaa.nws.ncep.edex.ingest.grib.util/component-deploy.xml
gov.noaa.nws.ncep.edex.common/component-deploy.xml
com.raytheon.uf.edex.log/component-deploy.xml
com.raytheon.uf.edex.ohd/component-deploy.xml
com.raytheon.uf.edex.awipstools/component-deploy.xml
com.raytheon.uf.edex.esb.camel/component-deploy.xml
com.raytheon.uf.common.dataquery/component-deploy.xml
com.raytheon.uf.edex.decodertools/component-deploy.xml
com.raytheon.uf.edex.topo/component-deploy.xml
com.raytheon.uf.common.alertmonitor/component-deploy.xml
com.raytheon.uf.common.activetable/component-deploy.xml
com.raytheon.uf.edex.alertviz/component-deploy.xml
com.raytheon.uf.common.management/component-deploy.xml
com.raytheon.uf.common.derivparam/component-deploy.xml
com.raytheon.uf.edex.dissemination/component-deploy.xml
com.raytheon.edex.kml/component-deploy.xml
com.raytheon.messaging.mhs/component-deploy.xml
com.raytheon.uf.common.colormap/component-deploy.xml
com.raytheon.uf.common.monitor.cpg/component-deploy.xml
gov.noaa.nws.ncep.common.log/component-deploy.xml
com.raytheon.edex.monitorsrv/component-deploy.xml
com.raytheon.edex.textdb/component-deploy.xml
com.raytheon.uf.edex.purgesrv/component-deploy.xml
com.raytheon.uf.edex.auth/component-deploy.xml
com.raytheon.uf.edex.site/component-deploy.xml
com.raytheon.uf.edex.maintenance/component-deploy.xml
com.raytheon.uf.edex.activetable/component-deploy.xml
com.raytheon.uf.common.hlstopo/component-deploy.xml

View file

@ -1,51 +0,0 @@
## Cots includes file generated on 2012-01-20 17:08:45 GMT
com.sun.jndi.nis/*.jar
net.sf.ehcache/*.jar
javax.persistence/*.jar
org.eclipse.jetty/*.jar
net.sf.cglib/*.jar
org.apache.commons.logging/*.jar
org.apache.commons.codec/*.jar
org.apache.commons.lang/*.jar
org.apache.commons.digester/*.jar
org.dom4j/*.jar
org.apache.tools.bzip2/*.jar
org.slf4j/*.jar
org.springframework/*.jar
uk.ltd.getahead/*.jar
org.objectweb/*.jar
org.apache.activemq/*.jar
org.apache.mina/*.jar
org.postgres/postgis.jar
org.postgres/postgresql-8.3-603.jdbc3.jar
javax.vecmath/*.jar
javax.mail/*.jar
org.apache.commons.configuration/*.jar
org.apache.commons.beanutils/*.jar
com.facebook.thrift/*.jar
org.apache.camel/*.jar
org.apache.commons.pool/*.jar
org.apache.log4j/*.jar
org.jep/*.jar
ncsa.hdf5/jhdf5.jar
com.sun.jna/*.jar
edu.wisc.ssec.mcidas/*.jar
org.apache.commons.management/*.jar
com.opensymphony.ognl/*.jar
javax.jms/*.jar
org.apache.commons.collections/*.jar
org.jboss.cache/*.jar
javax.measure/*.jar
org.apache.http/*.jar
org.apache.commons.cli/*.jar
ucar.nc2/*.jar
org.apache.tomcat.nativ/*.jar
org.hibernate/*.jar
org.apache.velocity/velocity-1.5.jar
org.apache.velocity/velocity-tools-generic-1.3.jar
org.apache.commons.validator/*.jar
com.mchange/*.jar
org.apache.qpid/*.jar
org.geotools/*.jar
javax.media.opengl/gluegen-rt.jar
javax.activation/*.jar

View file

@ -1,154 +0,0 @@
## Plug-in includes file generated on 2012-01-20 17:08:45 GMT
com.raytheon.uf.edex.plugin.satellite.mcidas/component-deploy.xml
com.raytheon.edex.plugin.ldadhydro/component-deploy.xml
com.raytheon.uf.edex.plugin.loctables/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.intlsigmet/component-deploy.xml
com.raytheon.uf.edex.plugin.acars/component-deploy.xml
com.raytheon.uf.edex.plugin.npp.viirs/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.intlsigmet/component-deploy.xml
com.raytheon.edex.plugin.ldadprofiler/component-deploy.xml
com.raytheon.edex.plugin.binlightning/component-deploy.xml
com.raytheon.edex.plugin.textlightning/component-deploy.xml
com.raytheon.uf.edex.plugin.svrwx/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.convsigmet/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.bufrsgwh/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.scd/component-deploy.xml
com.raytheon.edex.plugin.shef/component-deploy.xml
com.raytheon.uf.common.dataplugin.cwa/component-deploy.xml
com.raytheon.uf.common.dataplugin.level/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.airmet/component-deploy.xml
com.raytheon.uf.edex.plugin.mesowest/component-deploy.xml
com.raytheon.uf.common.dataplugin.ldadmesonet/component-deploy.xml
com.raytheon.uf.common.dataplugin.gfe/component-deploy.xml
com.raytheon.edex.plugin.radar/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.pafm/component-deploy.xml
com.raytheon.uf.edex.plugin.tcs/component-deploy.xml
com.raytheon.uf.common.dataplugin.binlightning/component-deploy.xml
com.raytheon.edex.plugin.airep/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.aww/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.airmet/component-deploy.xml
com.raytheon.uf.common.dataplugin.bufrquikscat/component-deploy.xml
com.raytheon.uf.common.dataplugin.preciprate/component-deploy.xml
com.raytheon.uf.edex.plugin.level.handler/component-deploy.xml
com.raytheon.uf.common.dataplugin.bufrsigwx/component-deploy.xml
com.raytheon.uf.common.dataplugin.ffmp/component-deploy.xml
com.raytheon.uf.common.dataplugin.cwat/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.atcf/component-deploy.xml
com.raytheon.edex.plugin.ldad/component-deploy.xml
com.raytheon.uf.edex.plugin.manualIngest/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.bufrsgwhv/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.ncccfp/component-deploy.xml
com.raytheon.uf.common.dataplugin.radar/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.nctext/component-deploy.xml
com.raytheon.uf.edex.plugin.cwa/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.tcm/component-deploy.xml
com.raytheon.edex.plugin.grib/component-deploy.xml
com.raytheon.edex.plugin.warning/component-deploy.xml
com.raytheon.edex.plugin.profiler/component-deploy.xml
com.raytheon.uf.common.dataplugin.scan/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.aww/component-deploy.xml
com.raytheon.edex.plugin.pirep/component-deploy.xml
com.raytheon.uf.common.dataplugin.bufrua/component-deploy.xml
com.raytheon.uf.common.dataplugin.obs/component-deploy.xml
com.raytheon.uf.common.dataplugin.goessounding/component-deploy.xml
com.raytheon.uf.common.dataplugin.bufrssmi/component-deploy.xml
com.raytheon.edex.plugin.bufrua/component-deploy.xml
com.raytheon.uf.common.plugin.nwsauth/component-deploy.xml
com.raytheon.edex.plugin.goessounding/component-deploy.xml
com.raytheon.uf.common.dataplugin.fog/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.wcp/component-deploy.xml
com.raytheon.edex.plugin.sfcobs/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.bufrsgwh/component-deploy.xml
com.raytheon.edex.plugin.poessounding/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.ncscat/component-deploy.xml
com.raytheon.uf.common.dataplugin.warning/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.ffg/component-deploy.xml
com.raytheon.uf.edex.plugin.bufrhdw/component-deploy.xml
com.raytheon.uf.common.dataplugin.bufrascat/component-deploy.xml
com.raytheon.uf.common.dataplugin.shef/component-deploy.xml
com.raytheon.edex.plugin.ccfp/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.bufrssha/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.ffg/component-deploy.xml
com.raytheon.uf.common.dataplugin.vil/component-deploy.xml
com.raytheon.edex.plugin.ldadmanual/component-deploy.xml
com.raytheon.uf.edex.plugin.bufrquikscat/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/component-deploy.xml
com.raytheon.uf.edex.plugin.vil/component-deploy.xml
com.raytheon.uf.common.dataplugin.tcg/component-deploy.xml
com.raytheon.uf.common.dataplugin.lsr/component-deploy.xml
com.raytheon.edex.plugin.redbook/component-deploy.xml
com.raytheon.edex.plugin.obs/component-deploy.xml
com.raytheon.uf.edex.plugin.nwsauth/component-deploy.xml
com.raytheon.uf.common.dataplugin.sfcobs/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.h5scd/component-deploy.xml
com.raytheon.uf.common.dataplugin.tcs/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.ncccfp/component-deploy.xml
com.raytheon.edex.plugin.bufrmos/component-deploy.xml
com.raytheon.uf.edex.plugin.ffmp/component-deploy.xml
com.raytheon.uf.edex.plugin.scan.common/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.mcidas/component-deploy.xml
com.raytheon.uf.common.dataplugin/component-deploy.xml
com.raytheon.uf.edex.plugin.fssobs/component-deploy.xml
com.raytheon.uf.common.dataplugin.profiler/component-deploy.xml
com.raytheon.uf.common.dataplugin.text/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.ncgrib/component-deploy.xml
com.raytheon.uf.common.dataplugin.satellite/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.mcidas/component-deploy.xml
com.raytheon.uf.edex.plugin.lsr/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.uair/component-deploy.xml
com.raytheon.uf.edex.plugin.cwat/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.idft/component-deploy.xml
com.raytheon.uf.common.dataplugin.ldadhydro/component-deploy.xml
com.raytheon.uf.common.dataplugin.grib/component-deploy.xml
com.raytheon.uf.common.dataplugin.acars/component-deploy.xml
com.raytheon.uf.edex.plugin.scan/component-deploy.xml
com.raytheon.uf.edex.plugin.bufrncwf/component-deploy.xml
com.raytheon.uf.common.dataplugin.pirep/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.convsigmet/component-deploy.xml
com.raytheon.uf.edex.plugin.fog/component-deploy.xml
com.raytheon.uf.common.dataplugin.airep/component-deploy.xml
com.raytheon.edex.plugin.modelsounding/component-deploy.xml
com.raytheon.edex.plugin.taf/component-deploy.xml
com.raytheon.uf.edex.plugin.preciprate/component-deploy.xml
com.raytheon.uf.common.dataplugin.npp.viirs/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.nonconvsigmet/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.idft/component-deploy.xml
com.raytheon.uf.edex.plugin.bufrascat/component-deploy.xml
com.raytheon.uf.common.dataplugin.vaa/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.uair/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.atcf/component-deploy.xml
com.raytheon.uf.common.dataplugin.svrwx/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.pafm/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.h5uair/component-deploy.xml
com.raytheon.uf.common.dataplugin.qc/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.ncgrib/component-deploy.xml
com.raytheon.uf.common.dataplugin.qpf/component-deploy.xml
com.raytheon.uf.common.dataplugin.bufrhdw/component-deploy.xml
com.raytheon.edex.plugin.gfe/component-deploy.xml
com.raytheon.uf.edex.plugin.qc/component-deploy.xml
com.raytheon.uf.common.dataplugin.fssobs/component-deploy.xml
com.raytheon.uf.common.dataplugin.bufrncwf/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.ncscat/component-deploy.xml
com.raytheon.uf.edex.plugin.level/component-deploy.xml
com.raytheon.uf.edex.plugin.bufrmthdw/component-deploy.xml
com.raytheon.uf.common.dataplugin.acarssounding/component-deploy.xml
com.raytheon.edex.plugin.text/component-deploy.xml
com.raytheon.uf.edex.plugin.tcg/component-deploy.xml
com.raytheon.uf.edex.plugin.qpf/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.mosaic/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.bufrsgwhv/component-deploy.xml
com.raytheon.uf.edex.plugin.bufrsigwx/component-deploy.xml
com.raytheon.uf.edex.plugin.ldadmesonet/component-deploy.xml
com.raytheon.uf.common.dataplugin.bufrmthdw/component-deploy.xml
com.raytheon.uf.edex.plugin.acarssounding/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.tcm/component-deploy.xml
com.raytheon.edex.plugin.satellite/component-deploy.xml
com.raytheon.edex.plugin.recco/component-deploy.xml
com.raytheon.uf.edex.plugin.vaa/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.h5scd/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.scd/component-deploy.xml
gov.noaa.nws.ncep.edex.plugin.wcp/component-deploy.xml
com.raytheon.uf.common.dataplugin.poessounding/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.bufrssha/component-deploy.xml
com.raytheon.uf.edex.plugin.bufrssmi/component-deploy.xml
gov.noaa.nws.ncep.common.dataplugin.h5uair/component-deploy.xml

Binary file not shown.

View file

@ -0,0 +1,17 @@
#!/bin/bash
myPID=$$
echo -e "`date +%Y%m%d`\t`date +%H:%M:%S`\tStarting Script (pid = $myPID, parent = $PPID)" >> ~/logs/`basename $0 .sh`
if ps -wef|grep `basename $0` | grep -v grep | grep -v $myPID | grep -v $PPID
then
exit 0
fi
cd /data_store
while true
do
for _dir in `ls`
do
echo -e "`date +%Y%m%d`\t`date +%H:%M:%S`\t\tfind ${_dir} -mtime +0 -type f -exec rm -f {} \;" >> ~/logs/`basename $0 .sh`
find ${_dir} -mtime +0 -type f -exec rm -f {} \;
done
done

View file

@ -0,0 +1,176 @@
# $Id: scour.in,v 1.1.16.6.2.7 2009/07/16 19:27:13 steve Exp $
# Deletes old data files.
#
# Recursively deletes files older than a specified number of days from a
# specified set of directories. The directories, retention time in days,
# and an optional shell filename pattern appear, separated by tab characters
# one directory per line, in a configuration file named on the command line.
#
# If no files have been written under a directory since the last time scour was
# run, it will skip deleting old files and log an error message instead.
#
# WARNING: scour follows symbolic links, so don't put symbolic links to
# directories you don't want scoured under data directories.
PATH=/bin:/usr/bin
CONFFILE=/usr/local/ldm/etc/scour.conf # default, if no args
VERBOSEFLAG=
DEBUGFLAG=
ERRS=
PROG=`basename $0`
LOGGER="echo $PROG: "
TZ=UTC0 export TZ
LOG_LDM=local0
while [ "$1" != "" ]
do
case "$1" in
-v)
VERBOSEFLAG=1
;;
-x)
DEBUGFLAG=1
;;
-l) # logs to syslogd
LOGGER="logger -t $PROG -p $LOG_LDM.notice"
;;
-*)
$LOGGER "unrecognized flag ($1)"
ERRS=1
;;
*)
if [ $# -ne 1 ]
then
$LOGGER "only 1 conf file argument permitted"
ERRS=1
fi
CONFFILE=$1
;;
esac
shift
done
if [ "$ERRS" != "" ]
then
$LOGGER "usage: $PROG [-l] [-v] [-x] [config-file]"
exit 1
fi
if [ "$VERBOSEFLAG" != "" ]
then
$LOGGER "Starting Up"
fi
# Different find(1) utilities have different meanings for the "-mtime" argument.
# Discover the meaning for the find(1) utility that will be used.
#
dayOffsetName=scour_$$
trap 'rm -f /tmp/$dayOffsetName' EXIT
if touch /tmp/$dayOffsetName; then
sleep 2
#
# NOTE: OSF/1's find(1) utility doesn't conform to the Standard
# because the CWD must be changed in order to get this test to work.
#
dir=`pwd`
cd /tmp
if find $dayOffsetName -mtime 0 |
grep $dayOffsetName >/dev/null; then
DAY_OFFSET=1
elif find $dayOffsetName -mtime 1 |
grep $dayOffsetName >/dev/null; then
DAY_OFFSET=0
else
$LOGGER "Couldn't discover meaning of '-mtime' argument of find(1)"
exit 1
fi
cd $dir
rm /tmp/$dayOffsetName
else
$LOGGER "Couldn't create '-mtime' discovery-file /tmp/$dayOffsetName"
exit 1
fi
while read dir age pattern; do
if [ x$dir = x ] # ignore blank lines
then
continue
fi
case $dir in
\#*) # ignore comments
continue
;;
*)
if [ x$pattern = x ]
then
pattern="*"
fi
# Convert directory specification to absolute pathname: follow symbolic
# links (because find(1) doesn't) and perform tilde-expansion.
#
# NB: The statement
# edir=`csh -f -c "cd $dir && /bin/pwd"`
# causes the read(1) of the enclosing while-loop to return EOF if the
# directory doesn't exist.
#
if edir=`echo "cd $dir && /bin/pwd" | csh -f`; then
: true
else
$LOGGER "directory $dir does not exist, skipping"
continue
fi
if [ "$DEBUGFLAG" != "" ]
then
echo "dir=$dir age=$age pattern=$pattern edir=$edir"
fi
(
if cd $edir
then
# if either "$edir/.scour$pattern" doesn't exist yet OR
# there are files newer than "$edir/.scour$pattern"
# then
# delete old files and create "$edir/.scour$pattern"
# else
# skip deletions and log message
if [ ! -f ".scour$pattern" ] || \
[ -n "`find . -newer \".scour$pattern\" 2>/dev/null | \
head -1`" ]
then
FINDAGE=`echo $age $DAY_OFFSET - p|dc`
if [ "$VERBOSEFLAG" != "" ]
then
BEFORE=`du -s . 2>/dev/null | \
sed 's/^ *\([0-9]*\).*/\1/'`
fi
find . -type f -mtime +$FINDAGE -name "$pattern" -print \
| sed 's/\([^\n]\)/\\\1/g' \
| xargs rm -f && touch ".scour$pattern"
if [ "$VERBOSEFLAG" != "" ]
then
AFTER=`du -s . 2>/dev/null | \
sed 's/^ *\([0-9]*\).*/\1/'`
# set DELETED to max(0, BEFORE - AFTER)
DELETED=`echo $BEFORE $AFTER|\
sed 's/\([0-9]*\) \([0-9]*\).*/b=\1;a=\2;d=0;if(a<b)d=b-a;d/'|\
bc`
$LOGGER "$DELETED blocks from $edir/$pattern (>" \
"$age days old)"
fi
else
$LOGGER "skipping, no recent files in $edir/$pattern"
fi
fi
)
;;
esac
done < $CONFFILE
if [ "$VERBOSEFLAG" != "" ]
then
$LOGGER exiting ...
fi