]> andersk Git - moira.git/blob - regtape/reg-update
support for Lincoln Lab people: load with class LINCOLN and a high uid
[moira.git] / regtape / reg-update
1 #!/bin/sh
2 #
3 #  Script to update Moira from Registrar's "tapes".
4
5 date=`date +%y%m%d`
6 ##### date=`expr $date - 1` # files are postdated by 1 day
7
8 cd /moira/ || exit 1
9 for who in  staff student ; do
10   if  [ -f tapes/$who.input.$date.Z ] ; then
11     [ -s $who.input ] \
12     && mv $who.input.0 $who.input.1 \
13     && mv $who.input   $who.input.0
14
15     zcat tapes/$who.input.$date.Z | bin/$who.cvt > $who.input
16
17     [ -s $who.input ] \
18     && [ `diff $who.input.0 $who.input | wc -l` -lt 500 ] \
19     && bin/$who -n $who.input > $who.output.$date 2>&1 \
20     && egrep -v "($who): (adding|updating)" $who.output.$date > $who.err 2>&1 \
21     && cat /usr/local/lib/mail_header $who.err | mail dkk
22   fi
23 done
This page took 0.040554 seconds and 5 git commands to generate.