22 lines
571 B
Bash
Executable File
22 lines
571 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Set MAILADDRESS variable
|
|
read -p 'Type in your chaospott mail address: ' MAILADDRESS
|
|
|
|
# Get WKDHASH
|
|
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
|
|
# Export key into WKDHASH
|
|
gpg --no-armor --export "$MAILADDRESS" > "$WKDHASH"
|
|
git add "$WKDHASH"
|
|
|
|
# git commit and push
|
|
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
|