-#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