summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2016-02-15 22:09:09 +0900
committerRyota Mibu <r-mibu@cq.jp.nec.com>2016-02-15 13:16:04 +0000
commitd3f46a604b03967134e155eebdf72cd6fb912a43 (patch)
tree64711cadef55186a1894b2e03ead3aa012e523aa
parent507b91c45c918a506ddc3060772c730a18cbf17d (diff)
introduce @OPNFVDOCS_PATH@ and @PROJECT_PATH@
Change-Id: Icc3fcf36746e70dc0ec41826aa2e2fc3d86db2f1 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com> (cherry picked from commit 00abc9dc015c881138a2790a9757c58bb3d85255)
-rwxr-xr-xbuild-composite.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/build-composite.sh b/build-composite.sh
index 804805eb3..68c6c96a6 100755
--- a/build-composite.sh
+++ b/build-composite.sh
@@ -60,15 +60,23 @@ for repo in $repos; do
[[ -e $WORKSPACE/$repo/docs ]] || continue
[[ -e docs/projects/$repo ]] && rm -rf docs/projects/$repo
cp -r $WORKSPACE/$repo/docs docs/projects/$repo
+
+ # Replace PATH variables by source file folder paths.
+ # Note: Editors can recognize as follows:
+ # * @PROJECT_PATH@ is pointer to the project folder
+ # 'opnfvdocs/docs/projects/<project name>'.
+ # * @OPNFVDOCS_PATH@ is pointer to the main folder 'opnfvdocs/docs'.
+ # Note: 'docs_build/_src' is the folder in which all document contents
+ # will be copied during docs build process.
+ find docs/projects/$repo -type f -name '*.rst' -print | \
+ xargs -I f sed -i \
+ -e "s|@PROJECT_PATH@|docs_build/_src/projects/$repo|" \
+ -e "s|@OPNFVDOCS_PATH@|docs_build/_src|" f
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
-
# NOTE: automated link generation is not ready...
echo
echo "Creating document links"