From: Alex Dehnert Date: Mon, 8 Feb 2010 05:16:42 +0000 (-0500) Subject: New script to ease updating officer lists X-Git-Url: https://www.dehnerts.com/gitweb/?p=user%2Falex%2Fsoftware%2Fmy-snippets.git;a=commitdiff_plain;h=73b62d3cc33390c2fa36859a190b02ed4dd6f721 New script to ease updating officer lists --- diff --git a/Makefile b/Makefile index f226c21..927abb5 100644 --- 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 index 0000000..943af59 --- /dev/null +++ b/update-officers @@ -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