#!/bin/sh aggregate_interval_min=60 DIR=`pwd` ODIR=$1 rm -f $ODIR/*.xml last_aggregate_ts=$ODIR/last_aggregate.ts if find $last_aggregate_ts -mmin -$aggregate_interval_min 2>/dev/null | grep -q . ; then exit 0 else touch $last_aggregate_ts fi grep -v -e '^#' $ODIR/metadata.lst | (while read url cert; do cfile="" if [ "x$cert" != "x" ]; then cfile=$DIR/certs/$cert fi cmd="$DIR/scripts/pull-and-verify.sh $url $ODIR $cfile" $cmd || { echo "$cmd returned $ret" ; exit $ret ; } done) || exit $ret