diff --git a/genwkdkey b/genwkdkey index cc857b9..e3327c1 100755 --- a/genwkdkey +++ b/genwkdkey @@ -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 - # Export key into WKDHASH - gpg --no-armor --export "$MAILADDRESS" > "$WKDHASH" - git add "$WKDHASH" +if [ -n "$WKDHASHES" ]; then + for wkdhash in $WKDHASHES; do + # Export key into WKDHASH + gpg --no-armor --export "$MAILADDRESS" > "$wkdhash" + git add "$wkdhash" + done # git commit and push read -p 'Enter your nickname: ' NICKNAME