lawn-update - gopher-lawn - The gopher lawn gopher directory project.
 (HTM) git clone git://bitreich.org/gopher-lawn/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopher-lawn/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
       ---
       lawn-update (746B)
       ---
            1 #!/bin/sh
            2 
            3 export LANG=en_US.utf8
            4 
            5 lawngit="/scm/gopher-lawn"
            6 lawnbase="/br/gopher/lawn"
            7 lawnindex="${lawnbase}/index.gph"
            8 scmbase="/scm"
            9 tmpfile=$(mktemp)
           10 
           11 cd ${lawnbase}
           12 ./mk-all -u 2>&1 >/dev/null
           13 
           14 cd "${lawnbase}"
           15 linkcount="$(cd db; grep -r "LinkName" | wc -l)"
           16 
           17 cd "${lawngit}"
           18 
           19 {
           20         git show \
           21                 -q \
           22                 --pretty="format:[1|%<(12,trunc)%ai %<(40,trunc)%s by %an|/scm/gopher-lawn/commit/%H.gph|server|port]" \
           23                 HEAD...HEAD~4;
           24         printf "\n\n";
           25         printf "%d links are indexed at the moment.\n" "${linkcount}"
           26 } > "${tmpfile}"
           27 
           28 # Now change the gph files in a really easy way.
           29 {
           30         printf "/C_H_A_N_G_E_S/+1,/P_R_O_J_E_C_T/-2d\n"
           31         printf "/C_H_A_N_G_E_S/r !cat ${tmpfile}\n"
           32         printf "w\nq\n"
           33 } | ed -s "${lawnindex}" >/dev/null
           34 
           35 rm -f "${tmpfile}"
           36