arch/pkg/de-p1st-gnupg/99_import_pubkey.sh

16 lines
471 B
Bash
Raw Normal View History

2022-11-06 11:19:13 +01:00
if ! gpg --export-ownertrust | grep --quiet '^94F3D3DDAC22802258FC044B6C47C753F0823002:6:$'; then
# Import public key.
# Write to stderr.
2021-06-15 12:51:49 +02:00
echo "Importing public key ..." >&2
2021-06-15 12:39:36 +02:00
gpg --import /usr/share/gnupg/94F3D3DDAC22802258FC044B6C47C753F0823002.pub || {
echo "p1st: Error importing pubkey!";
return 1;
}
echo "94F3D3DDAC22802258FC044B6C47C753F0823002:6:" | gpg --import-ownertrust || {
echo "p1st: Error changing trust!"
return 1;
}
fi