diff options
author | Erich Eckner <git@eckner.net> | 2019-05-24 13:56:51 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-05-24 13:56:51 +0200 |
commit | f103d6fd9874a13f416e0cb729a94f28f9674af1 (patch) | |
tree | 083173b20aba9acc48ce1ad5f2484c645f9bdfd7 /bin | |
parent | 118c5273e6cc12ce0438a07b98e7f7678635e71f (diff) | |
download | builder-f103d6fd9874a13f416e0cb729a94f28f9674af1.tar.xz |
bin/build-packages: download /some/ key from github
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/build-packages | 14 |
1 files changed, 13 insertions, 1 deletions
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 |