diff options
author | Nico Schottelius <nico@nico-notebook.schottelius.org> | 2019-09-10 02:26:56 +0900 |
---|---|---|
committer | Nico Schottelius <nico@nico-notebook.schottelius.org> | 2019-09-10 02:26:56 +0900 |
commit | 0bc99b0ace17890be6315aa79a1a794fa4aea639 (patch) | |
tree | 9ed093cfd50a1aad5775945a0d5ab049d456a6a0 /rif-friendimportexport.sh | |
parent | 4bb3b7918c3a709132ee015bac9691db8de820a7 (diff) |
Add friend import-export
Diffstat (limited to 'rif-friendimportexport.sh')
-rwxr-xr-x | rif-friendimportexport.sh | 20 |
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" |