diff options
Diffstat (limited to 'contrib/update-tos.sh')
-rwxr-xr-x | contrib/update-tos.sh | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/contrib/update-tos.sh b/contrib/update-tos.sh index 47d3af7..04fff48 100755 --- a/contrib/update-tos.sh +++ b/contrib/update-tos.sh @@ -6,6 +6,13 @@ # Error checking on set -eu + +if ! htmlark --version >/dev/null; then + echo "htmlark not installed" + echo "Run 'pip install htmlark'" + exit 1 +fi + echo "Generating TOS for ETag $VERSION" rm -f sphinx.log sphinx.err @@ -22,7 +29,16 @@ do rm -rf _build echo " Generating format $f" make -e SPHINXOPTS="-D language='$l'" $f >>sphinx.log 2>>sphinx.err < /dev/null - mv _build/$f/tos.$f $l/${VERSION}.$f + if test $f = "html" + then + htmlark -o $l/${VERSION}.$f _build/$f/${VERSION}.$f + else + mv _build/$f/${VERSION}.$f $l/${VERSION}.$f + fi + if test $f = "txt" + then + cp $l/${VERSION}.$f $l/${VERSION}.md + fi done done cd .. |