chiark / gitweb /
debugging for thing that crashed
[innduct.git] / extra / buildinnkeyring
1 #!/bin/bash
2 . /usr/lib/news/innshellvars
3
4 cd $PATHTMP
5
6 KEYSURL=ftp://ftp.isc.org/pub/pgpcontrol/PGPKEYS
7 KEYSFILE=PGPKEYS
8
9 KEYRING=${NEWSETC}/pgp/pubring.gpg
10
11 trap "rm -f $KEYSFILE" 0 1 2 15
12
13 rm -f ${KEYSFILE}
14 ${GETFTP} ${KEYSURL}
15
16 test -f ${KEYSFILE} || exit 1
17
18 gpg --batch --no-permission-warning \
19         --no-default-keyring --keyring=${KEYRING} --no-options \
20         --allow-non-selfsigned-uid --fast-import ${KEYSFILE}
21
22 exit $$
23 # this does not work because gpg refuses to use RSA-style fingerprints
24
25 KEYSERVER=keyserver.linux.it
26
27 SERVERKEYS=$(grep fingerprint ${CTLFILE} \
28         | sed -e 's/ //g' -e 's/.*[:=]/0x/' \
29         | grep -v '^#')
30
31 for key in $SERVERKEYS; do
32     gpg --batch --no-permission-warning --verbose \
33         --no-default-keyring --keyring=${KEYRING} --no-options \
34         --keyserver=${KEYSERVER} --recv-keys ${key}
35 done
36