projects
/
user
/
alex
/
software
/
my-snippets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
33676b6
)
list-of-lists-updater: mostly: use egrep and gaus
author
Alex Dehnert
<adehnert@mit.edu>
Fri, 18 Dec 2009 01:20:07 +0000
(20:20 -0500)
committer
Alex Dehnert
<adehnert@mit.edu>
Fri, 18 Dec 2009 01:20:07 +0000
(20:20 -0500)
list-of-lists-updater
patch
|
blob
|
history
diff --git
a/list-of-lists-updater
b/list-of-lists-updater
index 1ad1549ca80ae9544cbc816e03d665306a461857..5b5a016f3bab9c20e673caad5dc904e1277a0e2b 100755
(executable)
--- a/
list-of-lists-updater
+++ b/
list-of-lists-updater
@@
-14,7
+14,8
@@
nativepat=${nativepat:-ua}
function add_lists
{
(
function add_lists
{
(
- for list in $(blanche $prev | grep LIST | cut -d : -f 2); do # for each list we already know about
+ lists=$(blanche $prev | grep LIST | cut -d : -f 2)
+ for list in $lists; do # for each list we already know about
# Add a list's sublists
for newlist in $(blanche $list | grep LIST | cut -d : -f 2); do
blanche $prev -a $newlist;
# Add a list's sublists
for newlist in $(blanche $list | grep LIST | cut -d : -f 2); do
blanche $prev -a $newlist;
@@
-30,14
+31,18
@@
function add_lists
if [[ "$tmacl" == "LIST" ]]; then
blanche $prev -a $macl
fi
if [[ "$tmacl" == "LIST" ]]; then
blanche $prev -a $macl
fi
+ # Add stuff this owns
+ owned=$(athrun ops qy -s get_ace_use list $list | grep LIST | cut -d " " -f 2)
+ for newlist in $owned; do
+ blanche $prev -a $newlist;
+ done;
done
done
- ) 2>&1 | grep -v "Record already exists"
+ ) 2>&1 | grep -v "Record already exists"
| grep -v "moira (query): No records in database match query"
}
echo Current members: $(blanche $prev -m | wc)
echo Expanding out lists
add_lists
}
echo Current members: $(blanche $prev -m | wc)
echo Expanding out lists
add_lists
-add_lists
echo New members: $(blanche $prev -m | wc)
echo Removing foreign lists
for list in $(blanche $anti | grep LIST | cut -d : -f 2); do blanche $prev -d $list; done
echo New members: $(blanche $prev -m | wc)
echo Removing foreign lists
for list in $(blanche $anti | grep LIST | cut -d : -f 2); do blanche $prev -d $list; done
@@
-45,4
+50,4
@@
echo Finalized members: $(blanche $prev -m | wc)
echo
echo Likely foreign members
echo
echo Likely foreign members
-blanche $prev | grep LIST: | sed -e "s/^LIST://" |
grep -v $nativepat
+blanche $prev | grep LIST: | sed -e "s/^LIST://" |
egrep -v "$nativepat"