Artifact [044a2d83b9]

Artifact 044a2d83b9b25541dfe1be8aeceef6104967376b70d514994278f17d2b7ecd96:


#! /usr/bin/env bash

set -e

cd "$(dirname "${BASH_SOURCE[0]}")/.."

tclNanoVersion=0.1
tclNanoReleaseDate='09-Jul-2018'
wikiPageManual='Manual'

manPage="$(groff -mandoc -Thtml nano.man | sed -r 's@</*(body|html)( [^>]*|)>@@g;/<head>/,/<\/head>/ d' | sed "s/@@VERS@@/${tclNanoVersion}/g;s/@@SHORT_DATE@@/${tclNanoRelaseDate}/g" | sed 's/\[/\&#91;/g;s/\]/\&#93;/' | tail -n +5)"

oldManPage="$(fossil wiki export "${wikiPageManual}" 2>/dev/null)" || oldManPage=''

if [ "${oldManPage}" != "${manPage}" ]; then
	echo "${manPage}" | fossil wiki commit --mimetype text/x-fossil-wiki "${wikiPageManual}" || \
		echo "${manPage}" | fossil wiki create --mimetype text/x-fossil-wiki "${wikiPageManual}"
fi

exit 0