wkd/genwkdkey

22 lines
571 B
Plaintext
Raw Normal View History

2022-06-15 20:34:02 +00:00
#!/bin/bash
2022-06-16 12:35:40 +00:00
# Set MAILADDRESS variable
2022-06-15 20:34:02 +00:00
read -p 'Type in your chaospott mail address: ' MAILADDRESS
2022-06-16 12:35:40 +00:00
# Get WKDHASH
2022-06-15 20:34:02 +00:00
WKDHASH=$(gpg --with-wkd-hash --fingerprint "$MAILADDRESS" | egrep "[ ]{14}[0-9a-z]{32}@chaospott\.de" | sed 's/ //g;s/@chaospott\.de//')
if [ -n "$WKDHASH" ]; then
2022-06-16 12:35:40 +00:00
# Export key into WKDHASH
2022-06-15 20:34:02 +00:00
gpg --no-armor --export "$MAILADDRESS" > "$WKDHASH"
git add "$WKDHASH"
2022-06-16 12:35:40 +00:00
# git commit and push
2022-06-15 20:34:02 +00:00
echo "OK. Now put your nickname in the commit message."
read -p 'Press enter.'
git commit
git push
else
echo "Mail address is not in your keyring."
fi