Home
       mk-db-entries.sh - gopher-lawn - The gopher lawn gopher directory project.
  HTML git clone git://bitreich.org/gopher-lawn/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopher-lawn/
   DIR Log
   DIR Files
   DIR Refs
   DIR 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':' -f 1)"
           11         port="$(printf "%s\n" "${line}" | cut -d' ' -f 1 | cut -d':' -f 2)"
           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" "${server}"
           20                 printf "Keywords: fediverse\n"
           21                 printf "Category: fediverse\n"
           22                 printf "\n"
           23         } > "${linkfile}"
           24         git add "${linkfile}"
           25 done
           26