forked from freifunk-franken/VPNkeyXchange
16 lines
308 B
Bash
Executable File
16 lines
308 B
Bash
Executable File
#!/bin/bash
|
|
|
|
for id in $(curl http://keyserver.freifunk-franken.de/v2/hoods.php | jq '.[].id')
|
|
do
|
|
|
|
curl -o tmp.json http://keyserver.freifunk-franken.de/v2/?hoodid=$id
|
|
|
|
echo "ID $id"
|
|
file=$(jq -r '.hood.name' tmp.json | tr -d " ")
|
|
[[ "null" = $file ]] && rm tmp.json && exit
|
|
mv tmp.json "$file.json"
|
|
|
|
done
|
|
|
|
|