msys2-autobuild/msys2_autobuild/fetch-validpgpkeys.sh
Christoph Reiter 0d25d51a04 Convert the script to a Python package
It can now be invoked via `python -m msys2_autobuild` or
by installing it, which adds a "msys2-autobuild" script.

This is a first step towards splitting up the code.

The HTTP cache is now stored in the working directory
instead of the source directory.
2023-03-21 11:34:39 +01:00

18 lines
317 B
Bash

#!/bin/bash
. PKGBUILD
set -e
_keyserver=(
"keyserver.ubuntu.com"
"keys.gnupg.net"
"pgp.mit.edu"
"keys.openpgp.org"
)
for key in "${validpgpkeys[@]}"; do
for server in "${_keyserver[@]}"; do
timeout 20 /usr/bin/gpg --keyserver "${server}" --recv "${key}" && break || true
done
done