summaryrefslogtreecommitdiffstats
path: root/masterkey-sign.sh
blob: c83974b5ebbb6fe9ea36a97e39ab995f34836634 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

set -e

key=$1

TMPDIR="$(mktemp -d "/tmp/${0##*/}.XXXXXX")"
trap "rm -rf '${TMPDIR}'" EXIT TERM

gpg --quiet --recv-keys "$key"
# this signs ALL uids...
#printf 'y\ny\n' | gpg --default-key 0xA88E23E377514E00 --command-fd 0 --batch --quiet --sign-key "$key"
gpg --default-key 0xA88E23E377514E00 --only-sign-text-ids --edit-key "$key"
gpg --send-keys "$key"

cd ~/git/arch/archlinux-keyring

gpg --export "$key" > "$TMPDIR/key"
./keyringctl import "$TMPDIR/key"