summaryrefslogtreecommitdiff
path: root/download-missing-kernel-keys
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-05-17 10:06:21 +0200
committerErich Eckner <git@eckner.net>2016-05-17 10:06:21 +0200
commitee005b37624f1149101e42956eecf2ebd62c8854 (patch)
treec366edee7b7c70eb5577efb1478c7c8e0acc1725 /download-missing-kernel-keys
parent379024f6b7bc81625e3163fbd0c5e75b08df3241 (diff)
downloadkernelKeys-ee005b37624f1149101e42956eecf2ebd62c8854.tar.xz
nur noch neue Keys runterladen
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