mk-db-entries.sh - gopher-lawn - The gopher lawn gopher directory project. | |
git clone git://bitreich.org/gopher-lawn/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhf… | |
Log | |
Files | |
Refs | |
Tags | |
--- | |
mk-db-entries.sh (637B) | |
--- | |
1 #!/bin/sh | |
2 | |
3 lawndb="../db" | |
4 cd "${lawndb}" | |
5 | |
6 while read -r line; | |
7 do | |
8 [ -z "${line}" ] && continue | |
9 | |
10 server="$(printf "%s\n" "${line}" | cut -d' ' -f 1 | cut -d':' -… | |
11 port="$(printf "%s\n" "${line}" | cut -d' ' -f 1 | cut -d':' -f … | |
12 linkfile="fediverse-${server}.link" | |
13 { | |
14 printf "Type: link\n" | |
15 printf "Selector: \n" | |
16 printf "Host: %s\n" "${server}" | |
17 printf "Port: %s\n" "${port}" | |
18 printf "LinkName: Pleroma at %s\n" "${server}" | |
19 printf "Description: Pleroma interface running at %s\n" … | |
20 printf "Keywords: fediverse\n" | |
21 printf "Category: fediverse\n" | |
22 printf "\n" | |
23 } > "${linkfile}" | |
24 git add "${linkfile}" | |
25 done | |
26 |