Respect multiple user ids

This commit is contained in:
Bandie 2022-07-02 16:01:35 +02:00
parent 72bdd27348
commit c359875b1b
Signed by: Bandie
GPG Key ID: 7FA4FD7D1D7997C2

View File

@ -4,12 +4,14 @@
read -p 'Type in your chaospott mail address: ' MAILADDRESS
# Get WKDHASH
WKDHASH=$(gpg --with-wkd-hash --fingerprint "$MAILADDRESS" | egrep "[ ]+[0-9a-z]{32}@chaospott\.de" | head -n1 | sed 's/ //g;s/@chaospott\.de//')
WKDHASHES=$(gpg --with-wkd-hash --fingerprint "$MAILADDRESS" | egrep "[ ]+[0-9a-z]{32}@chaospott\.de" | sed 's/ //g;s/@chaospott\.de//')
if [ -n "$WKDHASH" ]; then
if [ -n "$WKDHASHES" ]; then
for wkdhash in $WKDHASHES; do
# Export key into WKDHASH
gpg --no-armor --export "$MAILADDRESS" > "$WKDHASH"
git add "$WKDHASH"
gpg --no-armor --export "$MAILADDRESS" > "$wkdhash"
git add "$wkdhash"
done
# git commit and push
read -p 'Enter your nickname: ' NICKNAME