X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fmatita%2Fscripts%2Fcrontab.sh;h=b545b108dc5968353d49b9d21a1a3181201da2e0;hb=bef16f9275581bd419fd633892c232c72a97a42e;hp=ccbe4c8f1fdbc3980b45e9d0c4f001b3dda190b7;hpb=f61316e2906cd8eecb73b1982b1784661702fd93;p=helm.git diff --git a/helm/matita/scripts/crontab.sh b/helm/matita/scripts/crontab.sh index ccbe4c8f1..b545b108d 100644 --- a/helm/matita/scripts/crontab.sh +++ b/helm/matita/scripts/crontab.sh @@ -1,29 +1,78 @@ -MARK=`date +%Y%m%d` -TMPDIRNAME=.__${MARK}_crontab +#!/bin/bash +TODAY=`date +%Y%m%d` +YESTERDAY=`date -d yesterday +%Y%m%d` +TMPDIRNAME=$HOME/__${TODAY}_crontab +TMPDIRNAMEOLD=$HOME/__${YESTERDAY}_crontab CVSROOT=":ext:$USER@marcello.cs.unibo.it:/home/faculty/PROJECTS/cvs/helm" +SHELLTIME2CENTSPHP=helm/matita/scripts/shell_time2cents.php +SHELLADDERPHP=helm/matita/scripts/shell_adder.php +COMMONPHP=helm/matita/scripts/public_html/common.php + OLD=$PWD -rm -rf $TMPDIRNAME -mkdir $TMPDIRNAME +mkdir -p $TMPDIRNAME +rm -rf $TMPDIRNAMEOLD cd $TMPDIRNAME +rm -rf helm cvs -d $CVSROOT co helm/matita/scripts 1>/dev/null 2>/dev/null -bash helm/matita/scripts/profile_cvs.sh > LOG +helm/matita/scripts/profile_cvs.sh 2> LOG + +MARK=`echo "select distinct mark from bench where mark like '$TODAY%' order by mark" | mysql -u helm matita | tail -n 1` +LASTMARK=`echo "select distinct mark from bench where mark like '$YESTERDAY%' order by mark" | mysql -u helm matita | tail -n 1` + +if [ -z "$MARK" ]; then + echo "No benchmark records for $TODAY" + exit 1 +fi -cat <