]> matita.cs.unibo.it Git - helm.git/commitdiff
fix
authorEnrico Tassi <enrico.tassi@inria.fr>
Thu, 23 Mar 2006 09:06:06 +0000 (09:06 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Thu, 23 Mar 2006 09:06:06 +0000 (09:06 +0000)
matita/scripts/crontab.sh

index 99b4a13a6b77abd171c9495eeac3dfdde1af9fbe..64708ba77e3916d53917fb9453301a0682177163 100644 (file)
@@ -47,7 +47,23 @@ fi
 CUR_TIME=`echo $SQLQTIME$MARK$SQLQGRMARK | $MYSQL`
 OLD_TIME=`echo $SQLQTIME$LASTMARK$SQLQGRMARK | $MYSQL`
 
-((DELTA=$CUR_CENTS-$OLD_CENTS))
+if [ -z "$CUR_TIME" -o -z "$OLD_TIME"]; then
+    cat <<EOT
+
+    Unable to calculate total time amounts:
+    
+      $SQLQTIME$MARK$SQLQGRMARK 
+      
+    or
+
+      $SQLQTIME$LASTMARK$SQLQGRMARK
+      
+    gave an empty result
+    
+EOT
+fi
+
+((DELTA=$CUR_TIME-$OLD_TIME))
 if [ $DELTA -lt 0 ]; then
   PERC=0
 else