/[gentoo]/xml/htdocs/proj/en/devrel/undertakers/scripts/search-retired-devs.sh.txt
Gentoo

Contents of /xml/htdocs/proj/en/devrel/undertakers/scripts/search-retired-devs.sh.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Jul 21 13:21:33 2010 UTC (4 years, 4 months ago) by jmbsvicetto
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
Added a script and a note in the retirement process to check group membership on cvs.gentoo.org for retired devs.

1 #!/bin/bash
2 # 2010-07-19
3
4 # FILES
5 GROUPS_LIST="/etc/group"
6 DEVS="devs.txt"
7 RETIRED_DEVS="retired-devs.txt"
8
9 # List of retired devs
10 ldapsearch '(&(gentooStatus=retired)(!(gentooAccess=infra-system.group)))' -Z uid -LLL -S uid | \
11 awk '/^uid:/{print $2}' > ${RETIRED_DEVS}
12
13 # List of devs in groups
14 cat /etc/group | cut -d : -f 4 | sed -e "/^$/d" | tr , '\n' | sort -u | sed -e "/^XXX/d" \
15 -e "/adm/d" -e "/bin/d" -e "/lp/d" -e "/root/d" -e "/uucp/d" -e "/games/d" -e "/gcfengine/d" \
16 -e "/gcvsd-rsync/d" -e "/gmanual/d" -e "/gmirror/d" -e "/gweb/d" -e "/man/d" -e "/news/d" \
17 -e "/portage/d" -e "/postfix/d" -e "/smmsp/d" > ${DEVS}
18
19
20 # List of devs to process
21 PROCESS_DEVS=""
22
23 # show the groups a retired dev is still a member of
24 print_dev() {
25
26 local dev="${1}"
27
28 local groups=$(grep ${dev} ${GROUPS_LIST} | cut -d : -f 1 | tr '\n' ' ')
29 echo "The retired dev ${dev} is on the ${groups}groups"
30 }
31
32 # get list of retired devs in the groups
33 get_retired_devs() {
34
35 PROCESS_DEVS=$(comm -12 ${DEVS} ${RETIRED_DEVS})
36 }
37
38 get_retired_devs
39
40 if [[ -n ${PROCES_DEVS} ]] ; then
41 echo ${PROCESS_DEVS} | tr ' ' '\n' | while read dev; do
42 print_dev ${dev}
43 done
44 fi

  ViewVC Help
Powered by ViewVC 1.1.20