summaryrefslogtreecommitdiff
path: root/rif-friendimportexport.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rif-friendimportexport.sh')
-rwxr-xr-xrif-friendimportexport.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/rif-friendimportexport.sh b/rif-friendimportexport.sh
new file mode 100755
index 0000000..a248e2f
--- /dev/null
+++ b/rif-friendimportexport.sh
@@ -0,0 +1,20 @@
+#!/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"