summaryrefslogtreecommitdiff
path: root/download-missing-kernel-keys
diff options
context:
space:
mode:
Diffstat (limited to 'download-missing-kernel-keys')
-rwxr-xr-xdownload-missing-kernel-keys33
1 files changed, 25 insertions, 8 deletions
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