5 datadir=${1:-$HOME/Private/listdiff}
6 if ! [[ -d "$datadir" ]]; then
7 echo "Please create and initialize the data directory"
9 echo "and rerun this script."
14 queries=( "gaus" "glom" )
21 for query in ${queries[@]}; do
24 if [ -z "$mod" ]; then hmod="nr"; fi
25 $qy $query ${mod}user "$subjectname" -s | sort > $query-user-$hmod.txt
26 $qy $query ${mod}kerberos "$subjectname@ATHENA.MIT.EDU" -s | sort > $query-kerb-$hmod.txt
30 stat="$(git diff --stat)"
33 result="$(git diff "$file")"
34 if [ -n "$result" ]; then
35 zwrite -c "$subjectname-lists" -i "$file" "$subjectname" -m "$result"
39 git commit -a -m "$(printf "Regular list update: %s\n\n%s" "$(date)" "$stat")"