pre.sh

File build/pre.sh from the latest check-in


#! /bin/bash

cd /home/rkeene/devel/freecolor || exit 1

newpage="$(groff -mandoc -Thtml < freecolor.1 | awk '/^<body>$/{ start = 1; next; } /^<\/body>$/{start = 0} /href="[^#]/{next} (start == 1){ print $0 }')"
oldpage="$(fossil wiki export Manual)"

if [ "${oldpage}" != "${newpage}" ]; then
	echo "${newpage}" | fossil wiki commit Manual

	fossil sync
fi