From ee005b37624f1149101e42956eecf2ebd62c8854 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 17 May 2016 10:06:21 +0200 Subject: nur noch neue Keys runterladen --- download-missing-kernel-keys | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'download-missing-kernel-keys') diff --git a/download-missing-kernel-keys b/download-missing-kernel-keys index c0e5ae0..e6348e8 100755 --- a/download-missing-kernel-keys +++ b/download-missing-kernel-keys @@ -17,20 +17,37 @@ signatures="$( grep '\.sign$' )" -keyIds=$( +alteKeyIds="$( echo "${signatures}" | \ parallel -j0 "$0" "{}" \; 2> /dev/null | \ sort -u -) +)" for ((i=0; i<$lvl; i++)) do - keyIds=$( - gpg --list-sigs ${keyIds} | \ - grep '^sig\s' | \ - sed 's|^sig\s.\{8\}\s\([0-9A-F]\{8\}\)\s.*$|0x\1|' | \ + echo "stage ${i}:" $(echo "${alteKeyIds}" | wc -l) "keys." + keyIds="$( + gpg --list-sigs --fast-list-mode --fixed-list-mode --with-colons ${alteKeyIds} | \ + grep '^sig:' | \ + cut -d: -f 5 | \ + sed 's|^|0x|' | \ + sort -u + )" + alleKeyIds="$( + ( + echo "${keyIds}" + echo "${alteKeyIds}" + ) | \ sort -u - ) - echo "${keyIds}" | \ + )" + + ( + echo "${alleKeyIds}" + echo "${alteKeyIds}" + ) | \ + sort | \ + uniq -u | \ xargs -n50 gpg --recv-keys + + alteKeyIds="${alleKeyIds}" done -- cgit v1.2.3-70-g09d2