summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2016-02-16 00:11:04 +0900
committerRyota Mibu <r-mibu@cq.jp.nec.com>2016-02-16 10:23:42 +0000
commit16fc0d8e995bed94bf722808fbc07b988fcb81c1 (patch)
treeba3159ff206346ee6d653277e167a5ce5b2de7a4
parent9aad0e670c7c4443145d15a59e86fcc987825241 (diff)
correct file path in imported rst files
Change-Id: I2d3a784dd3fcd41b2ba637cef633a4cf42ebadae Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com> (cherry picked from commit 410ae27d228750f1e48f13d89fcbedbdb0708da9)
-rwxr-xr-xbuild-composite.sh13
-rw-r--r--docs/configguide/index.rst2
2 files changed, 12 insertions, 3 deletions
diff --git a/build-composite.sh b/build-composite.sh
index 804805eb3..4264b8d8b 100755
--- a/build-composite.sh
+++ b/build-composite.sh
@@ -65,9 +65,16 @@ done
# NOTE: Removing index.rst in project repos to reduce number of docs.
find docs/projects -type f -name 'index.rst' -print | xargs -I i rm -f i
-# Correct Image file path (workaround)
-sed -i -e '/^.. figure::/s|images|../projects/promise/configguide/images|' \
- docs/projects/promise/configguide/featureconfig.rst
+# fix relative file paths
+pattern='.. \(include\|figure\):: *[^ \/]'
+base_path="/$(pwd)/docs_build/_src"
+find docs/projects -type f -name '*.rst' -print | while read f
+do
+ sed -i -e "/$pattern/s|:: *|:: $base_path/$(dirname ${f#docs/})/|" $f
+done
+
+# for debug
+grep -e '.. include::' -e '.. figure::' -r docs/projects
# NOTE: automated link generation is not ready...
echo
diff --git a/docs/configguide/index.rst b/docs/configguide/index.rst
index 1d042fb99..dfd8c4d53 100644
--- a/docs/configguide/index.rst
+++ b/docs/configguide/index.rst
@@ -6,6 +6,8 @@
OPNFV Configuration Guide
*************************
+.. test
+
.. toctree::
:maxdepth: 2