]> git.netwichtig.de Git - user/henk/code/shell/rif.git/blob - rif-friendimportexport.sh
Update all files to use RI6F instead of RIF
[user/henk/code/shell/rif.git] / rif-friendimportexport.sh
1 #!/bin/sh
2 # Nico Schottelius, 2019-09-10, Seoul
3
4 tmp=$(mktemp)
5
6 gpg --list-keys --with-colons | grep RI6F | awk -F: '{ print $10 }' | sed 's/\\x3a/:/' | (
7     while read line
8     do
9         name=$(echo $line | sed 's/\(.*\)(.*/\1/')
10         url=$(echo $line | sed -e 's/.*(RI6F //' -e 's/).*//')
11         keyurl=$url/rifkeys
12
13         echo "Getting friends from $name on $keyurl ..."
14         curl -6 -s "$keyurl" >> $tmp
15     done
16 )
17
18
19 gpg --import "$tmp"
20 rm -f "$tmp"