-
Notifications
You must be signed in to change notification settings - Fork 1
/
filterByHeads.sh
executable file
·29 lines (24 loc) · 1.47 KB
/
filterByHeads.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
for f in drupal.com.$DT.heads sf$DT.prj.new.heads repo.or.cz.$DT.heads gl$DT.new.heads gitlab.gnome.org.$DT.heads git.zx2c4.com.$DT.heads git.savannah.gnu.org.$DT.heads git.postgresql.org.$DT.heads git.kernel.org.$DT.heads git.eclipse.org.$DT.heads cgit.kde.org.$DT.heads bioconductor.org.$DT.heads android.googlesource.com.$DT.heads git.postgresql.org.$DT.heads;
do zcat $f | grep -v 'could not connect' | \
perl -ane 'chop(); ($u, @h) = split (/\;/, $_, -1); for $h0 (@h){print "$h0;$#h;$u\n" if $h0=~m|^[0-f]{40}$|}' | \
ssh da4 ~/bin/hasObj1.perl commit | cut -d\; -f3 | uniq > $f.get
done
for i in {00..29}
do f=gh$DT.u.$i.heads
zcat $f | grep -v 'could not connect' | \
perl -ane 'chop(); ($u, @h) = split (/\;/, $_, -1); for $h0 (@h){print "$h0;$#h;$u\n" if $h0=~m|^[0-f]{40}$|}' | \
ssh da4 ~/bin/hasObj1.perl commit | cut -d\; -f3 | uniq
done > gh$DT.u.heads.get
for i in {0..8}
do f=bitbucket$DT.new.$i.heads
zcat $f | grep -v 'could not connect' | \
perl -ane 'chop(); ($u, @h) = split (/\;/, $_, -1); for $h0 (@h){print "$h0;$#h;$u\n" if $h0=~m|^[0-f]{40}$|}' | \
ssh da4 ~/bin/hasObj1.perl commit | cut -d\; -f3 | uniq
done > bitbucket$DT.new.heads.get
for i in {0..9}
do f=git.debian.org.$DT.$i.heads
zcat $f | grep -v 'could not connect' | \
perl -ane 'chop(); ($u, @h) = split (/\;/, $_, -1); for $h0 (@h){print "$h0;$#h;$u\n" if $h0=~m|^[0-f]{40}$|}' | \
ssh da4 ~/bin/hasObj1.perl commit | cut -d\; -f3 | uniq
done > git.debian.org.$DT.heads.get