diff options
Diffstat (limited to 'parabola-keyring/update-keys')
-rwxr-xr-x | parabola-keyring/update-keys | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/parabola-keyring/update-keys b/parabola-keyring/update-keys new file mode 100755 index 0000000..aa42eac --- /dev/null +++ b/parabola-keyring/update-keys @@ -0,0 +1,42 @@ +#!/bin/bash + +export LANG=C + +TMPDIR=$(mktemp -d) +trap "rm -rf '${TMPDIR}'" EXIT + +KEYSERVER='hkp://pool.sks-keyservers.net' +GPG="gpg --quiet --batch --no-tty --no-permission-warning --keyserver "${KEYSERVER}" --homedir ${TMPDIR}" + +pushd "$(dirname "$0")" >/dev/null + +$GPG --gen-key <<EOF +%echo Generating Parabola Keyring keychain master key... +Key-Type: RSA +Key-Length: 1024 +Key-Usage: sign +Name-Real: Parabola Keyring Keychain Master Key +Name-Email: parabola-keyring@localhost +Expire-Date: 0 +%commit +%echo Done +EOF + +rm -rf packager +mkdir packager + +while read -ra data; do + keyid="${data[0]}" + username="${data[@]:1}" + ${GPG} --recv-keys ${keyid} &>/dev/null + printf 'clean\nquit\ny\n' | \ + ${GPG} --command-fd 0 --edit-key ${keyid} + FD=$(mktemp) + exec 4>"${FD}" + ${GPG} --yes --lsign-key ${keyid} &>/dev/null + ${GPG} --armor --output packager/${username}.asc --export ${keyid} +done < packager-keyids + +cat packager/*.asc > parabola.gpg + +popd >/dev/null |