]> mj.ucw.cz Git - eval.git/blob - bin/mo-ev-inc
Comment on obsolescence of this script.
[eval.git] / bin / mo-ev-inc
1 #!/bin/bash
2
3 [ -n "$1" ] || { echo "Usage: mo-ev-inc [--force] <tasks>" ; exit 1 ; }
4
5 force=0
6 if [ "$1" == --force ] ; then
7         force=1
8         shift
9 fi
10 for user in `bin/mo-get-users` ; do
11         for task in "$@" ; do
12                 echo -n "$user/$task: "
13                 if [ -d solutions/$user/$task ] ; then
14                         N=`cd solutions/$user/$task && cat * | md5sum | head -c16` 
15                 else
16                         N=none
17                 fi
18                 if [ -f testing/$user/$task/sum ] ; then
19                         O=`cat testing/$user/$task/sum`
20                 else
21                         O=none
22                 fi
23                 if [ $force == 1 -a $N != none ] ; then
24                         O=forced
25                 fi
26                 echo -n "($O $N) "
27                 if [ $O == $N ] ; then
28                         echo OK
29                 elif [ $N == none ] ; then
30                         rm -rf testing/$user/$task
31                         echo DELETED
32                 else
33                         echo CHANGED
34                         bin/ev $user $task
35                         echo $N >testing/$user/$task/sum
36                 fi
37         done
38 done