Home
Add old lawn-update into repository for better tracking - 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 --- DIR commit 63daddf66e7f329a3fffe5925f2ab9c1cf321fcd DIR parent f17f7e0fb5a99f87a5b160f330449e0e79240fa2 HTML Author: Christoph Lohmann <20h@r-36.net> Date: Fri, 28 Aug 2020 13:00:18 +0200 Add old lawn-update into repository for better tracking Diffstat: A lawn-update | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+), 0 deletions(-) --- DIR diff --git a/lawn-update b/lawn-update @@ -0,0 +1,32 @@ +#!/bin/sh + +export LANG=en_US.utf8 + +lawngit="/scm/gopher-lawn" +lawnbase="/br/gopher/lawn" +lawnindex="${lawnbase}/index.gph" +scmbase="/scm" +tmpfile=$(mktemp) + +cd "${lawnbase}" +linkcount="$(grep --exclude-dir=".git" -r "]" | grep -v "|server|" | wc -l)" + +cd "${lawngit}" + +{ + git show \ + -q \ + --pretty="format:[1|%<(12,trunc)%ai %<(40,trunc)%s by %an|/scm/gopher-lawn/commit/%H.gph|server|port]" \ + HEAD...HEAD~4; + printf "\n\n"; + printf "%d links are indexed at the moment.\n" "${linkcount}" +} > "${tmpfile}" + +# Now change the gph files in a really easy way. +{ + printf "/C_H_A_N_G_E_S/+1,/P_R_O_J_E_C_T/-2d\n" + printf "/C_H_A_N_G_E_S/r !cat ${tmpfile}\n" + printf "w\nq\n" +} | ed -s "${lawnindex}" + +rm -f "${tmpfile}"