summaryrefslogtreecommitdiff
path: root/bin/update-gpg-keys
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-01-22 10:09:35 +0100
committerErich Eckner <git@eckner.net>2021-01-22 10:09:35 +0100
commitc74a056b42929ca71a470e1df7699b3333530b52 (patch)
tree73314d8fb00ee1051058b0c0e5f57bb5c709f46e /bin/update-gpg-keys
parent0d9ea438ab93fdbbb775979faebf1a6c083cfa47 (diff)
downloadbuilder-c74a056b42929ca71a470e1df7699b3333530b52.tar.xz
bin/update-gpg-keys: upload all keys at once
Diffstat (limited to 'bin/update-gpg-keys')
-rwxr-xr-xbin/update-gpg-keys12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/update-gpg-keys b/bin/update-gpg-keys
index 5a37e78..fe6dfe3 100755
--- a/bin/update-gpg-keys
+++ b/bin/update-gpg-keys
@@ -28,9 +28,6 @@ fi
| gpg --import --quiet \
>/dev/null 2>&1 \
|| true
- gpg -a --export "${fingerprint}" \
- | curl -T - 'https://archlinux32.org/keys.php' \
- >/dev/null 2>&1
printf 'UPDATE `gpg_keys`'
printf ' SET `gpg_keys`.`public_key`=from_base64("%s")' \
"$(
@@ -41,3 +38,12 @@ fi
"${fingerprint}"
done \
| mysql_run_query
+
+# shellcheck disable=SC2016
+{
+ printf 'SELECT `gpg_keys`.`fingerprint`'
+ printf ' FROM `gpg_keys`;\n'
+} \
+| mysql_run_query \
+| xargs -r gpg -a --export \
+| curl -T - 'https://archlinux32.org/keys.php'