summaryrefslogtreecommitdiff
path: root/contrib/update-tos.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-02-11 15:40:37 +0100
committerChristian Grothoff <christian@grothoff.org>2020-02-11 15:40:37 +0100
commit3ad698d01865c9f1b5c5aadc2f4d8b0a3658b81c (patch)
tree671de5acc0a13cafe636bf1e220496a5882a8b74 /contrib/update-tos.sh
parentde0d987e34d426f6ed3593840078442191255587 (diff)
parentcdaf1ce69b5fb56f09bbdc00942b03f039710614 (diff)
downloadexchange-3ad698d01865c9f1b5c5aadc2f4d8b0a3658b81c.tar.gz
exchange-3ad698d01865c9f1b5c5aadc2f4d8b0a3658b81c.tar.bz2
exchange-3ad698d01865c9f1b5c5aadc2f4d8b0a3658b81c.zip
merging
Diffstat (limited to 'contrib/update-tos.sh')
-rwxr-xr-xcontrib/update-tos.sh28
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 ..