From c145de30a55fb5c64c023236fd149d336f5435a3 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Wed, 29 Jun 2005 12:39:21 +0000 Subject: [PATCH] catches more errors --- helm/matita/scripts/crontab.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/helm/matita/scripts/crontab.sh b/helm/matita/scripts/crontab.sh index 20bd7b076..67edb84e2 100644 --- a/helm/matita/scripts/crontab.sh +++ b/helm/matita/scripts/crontab.sh @@ -8,11 +8,17 @@ OLD=$PWD rm -rf $TMPDIRNAME mkdir $TMPDIRNAME cd $TMPDIRNAME -#cvs -d $CVSROOT co helm/matita/scripts 1>/dev/null 2>/dev/null -#helm/matita/scripts/profile_cvs.sh 2> LOG +cvs -d $CVSROOT co helm/matita/scripts 1>/dev/null 2>/dev/null +helm/matita/scripts/profile_cvs.sh 2> LOG CUR_TIME=`echo "select mark, SUM(TIME_TO_SEC(time)) from bench where mark = \"$MARK\" group by mark;" | mysql -u helm -h mowgli.cs.unibo.it matita | tail -n 1 | awk '{print $2}'` OLD_TIME=`echo "select mark, SUM(TIME_TO_SEC(time)) from bench where mark = \"$LASTMARK\" group by mark;" | mysql -u helm -h mowgli.cs.unibo.it matita | tail -n 1 | awk '{print $2}'` + +if [ -z "$CUR_TIME" -o -z "$OLD_TIME" ]; then + echo "No benchamks records for $MARK" + exit 1 +fi + ((DELTA=$CUR_TIME - $OLD_TIME)) if [ $DELTA -lt 0 ]; then ((DELTA=$DELTA * -1)) -- 2.39.2