summaryrefslogtreecommitdiffstats
path: root/build-composite.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build-composite.sh')
-rwxr-xr-xbuild-composite.sh13
1 files changed, 10 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