diff options
author | Ryota MIBU <r-mibu@cq.jp.nec.com> | 2016-01-12 02:38:55 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-01-12 02:38:56 +0000 |
commit | 906ad9f4c9eb0ae29776c5780f41058b6251cab3 (patch) | |
tree | 6d75e1851a208b468aac83f553bc902382a18505 | |
parent | fa77f821ca49e097f2e697359a2c1f184a6e919e (diff) | |
parent | da455db4cd5fd4c743af4cac3b402870e883dbec (diff) |
Merge "support ODT format creation in docs-build.sh"
-rwxr-xr-x | utils/docs-build.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/utils/docs-build.sh b/utils/docs-build.sh index 914eaf207..55cb9f652 100755 --- a/utils/docs-build.sh +++ b/utils/docs-build.sh @@ -179,6 +179,21 @@ do [[ -n "$GERRIT_COMMENT" ]] && echo "$msg" >> "$GERRIT_COMMENT" } + # TODO: failures in ODT creation should be handled error and + # cause 'exit 1' before OPNFV B release. + tex=$(find $build -name '*.tex' | head -1) + odt=$(basename "${tex%.tex}.odt") + if [[ -e $tex ]] && which pandoc > /dev/null ; then + pandoc $tex -o $output/$odt || { + msg="Error: ODT creation for $dir has failed." + echo + echo "$msg" + echo + } + else + echo "Warn: tex file and/or 'pandoc' are not found, skip ODT creation." + fi + if is_top_dir "$dir" ; then # NOTE: Having top level document (docs/index.rst) is not recommended. # It may cause conflicts with other docs (mostly with HTML |