Replace the call of "portageq portdir" with "portageq get_repo_path / gentoo".
[proj/qa-scripts.git] / gen-dev-wot.sh
1 #!/bin/bash
2
3 # silence the script by '&> /dev/null'
4
5 if [[ -z "$1" ]]; then
6 echo "Usage: $0 </path/to/output/>"
7 exit 1
8 fi
9 if [[ ! -e /usr/bin/sig2dot ]]; then
10 echo "install signing-party"; exit 1
11 fi
12 if [[ ! -e /usr/bin/neato ]]; then
13 echo "install graphviz"; exit 1
14 fi
15
16 export GNUPGHOME=$(mktemp -d --suffix=$(basename $0))
17 cd $GNUPGHOME || exit 1
18
19 wget -q -O - http://www.gentoo.org/proj/en/devrel/roll-call/userinfo.xml | \
20 egrep -o 0x[A-Z0-9]\{8\} > keys.txt
21
22 /usr/bin/gpg -q --keyserver hkp://pool.sks-keyservers.net --recv-keys \
23 `cat keys.txt`
24
25 /usr/bin/gpg -q --no-default-keyring --list-sigs | \
26 /usr/bin/sig2dot -q -t "Gentoo Dev WoT" -s wot-stats.html \
27 > keys.dot
28
29 /usr/bin/dot -Gcharset=latin1 -Tpng keys.dot > "${1}/wot-graph.png"
30
31 mv wot-stats.html "${1}"
32 rm -rf $GNUPGHOME