diff options
author | Erich Eckner <git@eckner.net> | 2021-01-22 10:09:35 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-01-22 10:09:35 +0100 |
commit | c74a056b42929ca71a470e1df7699b3333530b52 (patch) | |
tree | 73314d8fb00ee1051058b0c0e5f57bb5c709f46e /bin/update-gpg-keys | |
parent | 0d9ea438ab93fdbbb775979faebf1a6c083cfa47 (diff) | |
download | builder-c74a056b42929ca71a470e1df7699b3333530b52.tar.xz |
bin/update-gpg-keys: upload all keys at once
Diffstat (limited to 'bin/update-gpg-keys')
-rwxr-xr-x | bin/update-gpg-keys | 12 |
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' |