X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Fscripts%2Fcrontab.sh;h=5ad50de5ee47ea77bb1a997c1fb067a5752ba4e8;hb=7be6aeb94aa8da17732511a4844bd108976f947f;hp=d8ac761b3e01427dbb89fe3e3334058b6ae78a04;hpb=009739efca25e3ae8794e0ac281f2371568860d7;p=helm.git diff --git a/helm/matita/scripts/crontab.sh b/helm/matita/scripts/crontab.sh index d8ac761b3..5ad50de5e 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 -CVSROOT=":ext:$USER@marcello.cs.unibo.it:/home/faculty/PROJECTS/cvs/helm" +#!/bin/bash +TODAY=`date +%Y%m%d` +YESTERDAY=`date -d yesterday +%Y%m%d` +TMPDIRNAME=$HOME/__${TODAY}_crontab +TMPDIRNAMEOLD=$HOME/__${YESTERDAY}_crontab +SVNROOT="svn+ssh://mowgli.cs.unibo.it/local/svn/helm/trunk/" +SHELLTIME2CENTSPHP=scripts/shell_time2cents.php +SHELLADDERPHP=scripts/shell_adder.php +COMMONPHP=scripts/public_html/common.php + OLD=$PWD -rm -rf $TMPDIRNAME -mkdir $TMPDIRNAME +mkdir -p $TMPDIRNAME +rm -rf $TMPDIRNAMEOLD cd $TMPDIRNAME -cvs -d $CVSROOT co helm/matita/scripts 1>/dev/null 2>/dev/null -bash helm/matita/scripts/profile_cvs.sh > LOG 1>&2 +rm -rf helm +svn co ${SVNROOT}helm/matita/scripts/ > LOG.svn 2>&1 +scripts/profile_svn.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 <