]> andersk Git - moira.git/commitdiff
Initial revision
authordkk <dkk>
Sun, 27 Nov 1994 08:20:36 +0000 (08:20 +0000)
committerdkk <dkk>
Sun, 27 Nov 1994 08:20:36 +0000 (08:20 +0000)
regtape/mail_header [new file with mode: 0644]
regtape/reg-update [new file with mode: 0644]

diff --git a/regtape/mail_header b/regtape/mail_header
new file mode 100644 (file)
index 0000000..6a7db66
--- /dev/null
@@ -0,0 +1,4 @@
+From: root@Moira.mit.edu
+Subject: staff/students load report
+Reply-to: moira-admin@mit.edu
+
diff --git a/regtape/reg-update b/regtape/reg-update
new file mode 100644 (file)
index 0000000..e00cf93
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+#  Script to update Moira from Registrar's "tapes".
+
+date=`/usr/local/bin/gdate +%y%m%d`
+date=`expr $date - 1`
+
+for who in  staff students ; do
+  [ -f /moira/tapes/$who.input.$date.Z ] \
+  && cd /moira/ \
+  && mv $who.input.0 $who.input.1 \
+  && mv $who.input   $who.input.0 \
+  && zcat tapes/$who.input.$date.Z > $who.input \
+  && [ `diff $who.input.old $who.input | wc -l` -lt 500 ] \
+  && bin/$who -n $who.input > $who.output.$date 2>&1 \
+  && egrep -v "($who): (adding|updating)" $who.output.$date > $who.err 2>&1 \
+  && cat /usr/local/lib/mail_header $who.err | mail dkk
+done
This page took 0.06312 seconds and 5 git commands to generate.