summaryrefslogtreecommitdiff
path: root/scripts/classpath-daily
blob: c7405277346e280ed4604f58a171b27940a4a6ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

DATE=`date +"%Y%m%d"`
OUTPUTDIR=$HOME/public_html/classpath/daily
LOGFILE=$OUTPUTDIR/classpath-$DATE.log
FAILEDLOG=$OUTPUTDIR/classpath-failed-$DATE.log
MAIL="konqueror@gmx.de"

/home/mkoch/bin/classpath-build

if test "$?" = "1" ; then
  tail --lines=100 $LOGFILE > $FAILEDLOG

  mail $MAIL -s "classpath daily snapshot $DATE FAILED" < $FAILEDLOG
else
  mail $MAIL -s "classpath daily snapshot $DATE SUCCESSFUL" < /dev/null > /dev/null
fi