rif/rif-friendimportexport.sh

21 lines
463 B
Bash
Raw Normal View History

2019-09-09 17:26:56 +00:00
#!/bin/sh
# Nico Schottelius, 2019-09-10, Seoul
tmp=$(mktemp)
gpg --list-keys --with-colons | grep RIF | awk -F: '{ print $10 }' | sed 's/\\x3a/:/' | (
while read line
do
name=$(echo $line | sed 's/\(.*\)(.*/\1/')
url=$(echo $line | sed -e 's/.*(RIF //' -e 's/).*//')
keyurl=$url/rifkeys
echo "Getting friends from $name on $keyurl ..."
curl -6 -s "$keyurl" >> $tmp
done
)
gpg --import "$tmp"
rm -f "$tmp"