New script to ease updating officer lists
authorAlex Dehnert <adehnert@mit.edu>
Mon, 8 Feb 2010 05:16:42 +0000 (00:16 -0500)
committerAlex Dehnert <adehnert@mit.edu>
Mon, 8 Feb 2010 05:16:42 +0000 (00:16 -0500)
Makefile
update-officers [new file with mode: 0644]

index f226c2124873c116a3c4dc07ed0206e3cebe9a23..927abb5f676ea38e43278e5c9e34085456c7f11c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 archdir=/mit/$(ATHENA_USER)/arch/
 common=$(archdir)/common/
-scripts=bores-me  card-access  grep-owners  ldapfinger list-members  list-of-lists-updater  lists-lint  rt-set  rt-resolve check-host
+scripts=bores-me  card-access  grep-owners  ldapfinger list-members  list-of-lists-updater  lists-lint  rt-set  rt-resolve check-host  update-officers
 arches=i386_deb31  i386_deb40  i386_deb50  i386_rhel4
 
 all : install
diff --git a/update-officers b/update-officers
new file mode 100644 (file)
index 0000000..943af59
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+# Alex Dehnert
+
+officer_list=$1
+
+officer_lists=$(blanche $officer_list | cut -d : -f 2-)
+
+echo $officer_lists
+
+for officer in $officer_lists; do
+    officers=$(blanche $officer)
+    echo List $officer: $officers
+    read -p "Who should be punted? " -a punt
+    for apunt in ${punt[@]}; do
+        blanche $officer -d $apunt
+    done
+    read -p "Who should be added? " -a addee
+    for aaddee in ${addee[@]}; do
+        blanche $officer -a $aaddee
+    done
+    echo New list: $(blanche $officer)
+    echo
+done