]> git.netwichtig.de Git - user/henk/code/shell/rif.git/blobdiff - rif-importfriends.sh
Add script to listfriends and to import friends
[user/henk/code/shell/rif.git] / rif-importfriends.sh
diff --git a/rif-importfriends.sh b/rif-importfriends.sh
new file mode 100755 (executable)
index 0000000..887abc2
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+# 2019-09-10, Nico Schottelius, Seoul
+
+if [ $# -lt 1 ]; then
+    echo "$0: <URL> [URL...]"
+    echo "URL: of your real IPv6 friend(s)"
+    exit 1
+fi
+
+while [ $# -ge 1 ]; do
+    url=$1; shift
+    fullurl=${url}/rifkeys
+
+    curl -6 -s "${fullurl}" | gpg --import
+done