summaryrefslogtreecommitdiffstats
path: root/build-composite.sh
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2016-02-10 12:53:08 +0900
committerChristopher Price <christopher.price@ericsson.com>2016-02-11 09:55:15 +0000
commit6bd42c59ae30c30b460f6e69171e71a4e4f9c541 (patch)
tree3e925263edcf09e2fefa625ac3fd32bdffa36754 /build-composite.sh
parent1cba2564098a29f40292b4ee4b0097c7be2da715 (diff)
WIP: script: gather feature config guides automatically
Change-Id: Iedc50c723ee3ec0fa0e07848d633d35c67d5aa94 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
Diffstat (limited to 'build-composite.sh')
-rwxr-xr-xbuild-composite.sh41
1 files changed, 26 insertions, 15 deletions
diff --git a/build-composite.sh b/build-composite.sh
index 4aef8602a..574c4ecd9 100755
--- a/build-composite.sh
+++ b/build-composite.sh
@@ -70,21 +70,32 @@ 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"
-#echo
-#for guide in configguide userguide
-#do
-# link_list=$WORKSPACE/docs/$guide/projects-$guide.rst
-# for repo in $repos
-# do
-# file=projects/$repo/$guide/$guide.rst
-# [[ -e $WORKSPACE/docs/$file ]] || continue
-# echo "" >> $link_list
-# echo "$repo:" >> $link_list
-# echo ".. include:: ../$file" >> $link_list
-# done
-#done
+echo
+echo "Creating document links"
+echo
+#for guide in configguide/installer-config.rst configguide/feature-config.rst \
+# configguide/postinatall.rst \
+# userguide/feature-usage.rst userguide/test-usage.rst
+for guide in configguide/feature-config.rst
+do
+ mainfile="$WORKSPACE/docs/$guide"
+ for repo in $repos
+ do
+ projectfile="projects/$repo/${guide//-/}"
+ projectlink="${mainfile%/*}/featureconfig-$repo.rst"
+ [[ -e "$WORKSPACE/docs/$projectfile" ]] || continue
+ echo "Adding $repo to $guide ..."
+ echo "" >> $mainfile
+ echo ".. toctree::" >> $mainfile
+ echo "" >> $mainfile
+ echo " $projectlink" >> $mainfile
+ echo ".. include:: ../$projectfile" >> $projectlink
+ done
+ echo
+ echo "Generated $guide:"
+ cat $mainfile
+ echo
+done
$WORKSPACE/releng/utils/docs-build.sh