summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2016-01-12 22:23:20 +0900
committerRyota MIBU <r-mibu@cq.jp.nec.com>2016-01-12 22:25:16 +0900
commit0a2341e70bcf75105e6266f09f19dbe2704b7b4b (patch)
treeb2b35e34ee04737d40532bd7abd319ec735dc2bd /utils
parent7171b6e1b844baefec214f1b3a10f32b1901b5c0 (diff)
docs: fix ODT document creation
The command 'pandoc' has to be execute in the document folder, otherwise file path in tex can work. JIRA: RELENG-16 Change-Id: Ia054f6354dceb386805b21721a6736a446980d71 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
Diffstat (limited to 'utils')
-rwxr-xr-xutils/docs-build.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/utils/docs-build.sh b/utils/docs-build.sh
index 55cb9f652..7c444e3d8 100755
--- a/utils/docs-build.sh
+++ b/utils/docs-build.sh
@@ -182,9 +182,14 @@ do
# 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")
+ odt="${tex%.tex}.odt"
if [[ -e $tex ]] && which pandoc > /dev/null ; then
- pandoc $tex -o $output/$odt || {
+ (
+ cd $(dirname $tex)
+ pandoc $(basename $tex) -o $(basename $odt)
+ ) && {
+ mv $odt $output/
+ }|| {
msg="Error: ODT creation for $dir has failed."
echo
echo "$msg"