diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-02-07 00:44:35 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-02-07 00:44:35 +0100 |
commit | eae85d62c10907a71b9087866669a46907411023 (patch) | |
tree | 1e39a28531022ddb04524d74f3c954269d2599a3 /contrib/update-tos.sh | |
parent | 9e0a813b38b791a0bc020b8f1ee16d2b5d8712c6 (diff) |
proper i18n support for TOS
Diffstat (limited to 'contrib/update-tos.sh')
-rwxr-xr-x | contrib/update-tos.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/contrib/update-tos.sh b/contrib/update-tos.sh new file mode 100755 index 000000000..47d3af778 --- /dev/null +++ b/contrib/update-tos.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# This file is in the public domain + +# Should be called with the list of languages to generate, i.e. +# $ ./update-tos.sh en de fr it + +# Error checking on +set -eu +echo "Generating TOS for ETag $VERSION" + +rm -f sphinx.log sphinx.err +# We process inputs using Makefile in tos/ directory +cd tos +for l in $@ +do + mkdir -p $l + echo Generating TOS for language $l + # 'f' is for the supported formats, note that the 'make' target + # MUST match the file extension. + for f in html txt pdf epub xml + 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 + done +done +cd .. |