forked from pool/suse-build-key
Marcus Meissner
6e6d317d2b
OBS-URL: https://build.opensuse.org/package/show/Base:System/suse-build-key?expand=0&rev=45
14 lines
326 B
Bash
14 lines
326 B
Bash
#!/bin/bash
|
|
function keyname() {
|
|
for key in "$@"; do
|
|
while read line; do
|
|
[ "${line:0:4}" = "pub:" ] || continue
|
|
IFS=: eval set -- "\$line"
|
|
keyid="${5:8}"
|
|
printf "gpg-pubkey-%s-%08x\n" "${keyid,,}" "$6"
|
|
done < <(gpg --with-colons --import-options show-only --import 2>/dev/null < "$key")
|
|
done
|
|
}
|
|
|
|
keyname "$@"
|