| 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(-)
--- |
| @@ -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}" |