From: Martin Mares Date: Thu, 6 Apr 2006 10:51:38 +0000 (+0000) Subject: Added incremental evaluator. X-Git-Tag: python-dummy-working~421 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e8627523c8a8cddca30e63e3213009df9ff280de;p=eval.git Added incremental evaluator. --- diff --git a/bin/mo-ev-inc b/bin/mo-ev-inc new file mode 100755 index 0000000..47d7645 --- /dev/null +++ b/bin/mo-ev-inc @@ -0,0 +1,30 @@ +#!/bin/bash + +[ -n "$1" ] || { echo "Usage: mo-ev-inc " ; exit 1 ; } + +for user in `bin/mo-get-users` ; do + for task in "$@" ; do + echo -n "$user/$task: " + if [ -d solutions/$user/$task ] ; then + N=`cd solutions/$user/$task && cat * | md5sum | head -c16` + else + N=none + fi + if [ -f testing/$user/$task/sum ] ; then + O=`cat testing/$user/$task/sum` + else + O=none + fi + echo -n "($O $N) " + if [ $O == $N ] ; then + echo OK + elif [ $N == none ] ; then + rm -rf testing/$user/$task + echo DELETED + else + echo CHANGED + bin/ev $user $task + echo $N >testing/$user/$task/sum + fi + done +done