From f103d6fd9874a13f416e0cb729a94f28f9674af1 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 24 May 2019 13:56:51 +0200 Subject: bin/build-packages: download /some/ key from github --- bin/build-packages | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'bin/build-packages') diff --git a/bin/build-packages b/bin/build-packages index 73279f9..047130b 100755 --- a/bin/build-packages +++ b/bin/build-packages @@ -863,7 +863,19 @@ while [ "${count}" -ne 0 ] && \ ' {} \; | \ xargs -rn1 gpg --recv-keys || \ true - # TODO: maybe, we want to auto-receive keys from github here, too? + if grep -q ' FAILED (unknown public key \([0-9A-F]\{16\}\))'; then + # download the repository key from github + # TODO: get the name of the key file from its finger print or + # some other information inside the repository + makepkg --printsrcinfo | \ + sed -n ' + s,^\ssource = git+\(https://github\.com/[^/[:space:]]\+\)/[^/]*$,\1.gpg, + T + p + ' | \ + xargs -rn1 curl -s | \ + gpg --import || true + fi done if ! ${success}; then -- cgit v1.2.3-54-g00ecf