224 |
OUTPFIL=`basename $0`'.log' |
OUTPFIL=`basename $0`'.log' |
225 |
NBLDIFF=5 |
NBLDIFF=5 |
226 |
ADDRESS='none' |
ADDRESS='none' |
227 |
|
MAILCMD="mail" |
228 |
dBug=f |
dBug=f |
229 |
t4update=0 |
t4update=0 |
230 |
sTime=`date` |
sTime=`date` |
337 |
if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi |
if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi |
338 |
echo " t4update: run "`basename $0`" ( $PRC_MAILS newer than $OUTPSUM )" | tee $OUTPFIL |
echo " t4update: run "`basename $0`" ( $PRC_MAILS newer than $OUTPSUM )" | tee $OUTPFIL |
339 |
fi |
fi |
340 |
|
elif test -f $OUTPSUM -a $FIRSTDAY = $CURR_DAY ; then |
341 |
|
echo ' '$CMDLINE | tee -a $OUTPSUM |
342 |
|
echo " t4update: skip "`basename $0`" ( $PRC_MAILS missing )" | tee -a $OUTPSUM |
343 |
|
echo " End time: "`date` | tee -a $OUTPSUM |
344 |
|
exit 0 |
345 |
else |
else |
346 |
if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi |
if test -e $OUTPFIL ; then mv -f $OUTPFIL $OUTPFIL'_bak' ; fi |
347 |
echo " t4update ignored (not current day or $PRC_MAILS or $OUTPSUM missing)" | tee $OUTPFIL |
echo " t4update ignored (not current day or $OUTPSUM missing)" | tee $OUTPFIL |
348 |
fi |
fi |
349 |
elif test -e $OUTPFIL ; then |
elif test -e $OUTPFIL ; then |
350 |
mv -f $OUTPFIL $OUTPFIL'_bak' |
mv -f $OUTPFIL $OUTPFIL'_bak' |
392 |
( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > $TMP.dir_all |
( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > $TMP.dir_all |
393 |
|
|
394 |
if test "x$MACHINES" = "x_All_" ; then |
if test "x$MACHINES" = "x_All_" ; then |
395 |
MACHINES="aces- acesgrid baudelaire dickens danton pleiades" |
MACHINES="aces- acesgrid baudelaire engaging svante glacier uv100 ollie stan1" |
396 |
MACHINES="$MACHINES iblade sx8 uv100 stomp octopus svante saramago" |
MACHINES="$MACHINES pleiades archer stomp octopus saramago" |
397 |
|
|
398 |
MALL=`cat $TMP.dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq` |
MALL=`cat $TMP.dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq` |
399 |
for madd in $MALL ; do |
for madd in $MALL ; do |
463 |
echo " discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL |
echo " discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL |
464 |
cmis=`expr $cmis + 1` |
cmis=`expr $cmis + 1` |
465 |
elif test $num = '0' ; then |
elif test $num = '0' ; then |
466 |
echo "no previous test for:" $key | tee -a $OUTPFIL |
echo " dir='$sdir', type='$type', of='$optf':" | tee -a $OUTPFIL |
467 |
|
echo " --> no previous test matching key='$key'" | tee -a $OUTPFIL |
468 |
cmis=`expr $cmis + 1` |
cmis=`expr $cmis + 1` |
469 |
else |
else |
470 |
pline=`grep "^$key " $TMP.plist | head -1` |
pline=`grep "^$key " $TMP.plist | head -1` |
567 |
rm -f $TMP.dir_all $TMP.slist $TMP.plist |
rm -f $TMP.dir_all $TMP.slist $TMP.plist |
568 |
if test $OUTPFIL = "TTT.$$" ; then rm -f $OUTPFIL ; fi |
if test $OUTPFIL = "TTT.$$" ; then rm -f $OUTPFIL ; fi |
569 |
if test "x$ADDRESS" != 'xnone' ; then |
if test "x$ADDRESS" != 'xnone' ; then |
570 |
echo ".. send $OUTPSUM to $ADDRESS" |
#- change default sender address ("From:") using "mail -r" option |
571 |
mail -s $OUTPSUM $ADDRESS < $OUTPSUM |
# since, by default, baudelaire uses USER@localhost.localdomain |
572 |
|
#fullNam=`hostname -A | awk '{print $1}'` |
573 |
|
#MAILCMD="$MAILCMD -r ${USER}@${fullNam}" |
574 |
|
#--- |
575 |
|
echo ".. send $OUTPSUM to '$ADDRESS' using '$MAILCMD'" |
576 |
|
$MAILCMD -s 'check_outp summary' $ADDRESS < $OUTPSUM |
577 |
fi |
fi |
578 |
echo ".. cat $OUTPSUM" |
echo ".. cat $OUTPSUM" |
579 |
cat $OUTPSUM |
cat $OUTPSUM |