mkdoc_portal: fix issue with main doc page generation

Change-Id: I64fd0e7c9a574b0ed8164ca6faaf589a2ed83ed5
This commit is contained in:
Norbert Thiebaud
2016-03-27 19:47:41 -05:00
parent 72a6864221
commit 454ad54ccf

View File

@@ -1,5 +1,9 @@
#!/bin/bash
if [ -n "$debug" ] ; then
set -x
fi
SRCDIR="$1"
BASE_OUTPUT="$2"
@@ -51,11 +55,11 @@ local output="$1"
</div>
<div id="foot">
<small>
<p>Generated by Libreoffice <a href="http://cgit.freedesktop.org/libreoffice/core/plain/solenv/bin/mkdocs.sh">Module Description Tool</a></p>
<p>Generated by Libreoffice CI on $(hostname)</p>
<p>Last updated:
EOF
date -f '+%F %T' >> $output
date '+%F %T' >> $output
cat - >> $output <<EOF
</p>
</small>
@@ -90,8 +94,12 @@ header "LibreOffice Modules" " " "$BASE_OUTPUT/index.html"
for module_name in *; do
if [ -d $module_name ]; then
cur_file=$(echo $module_name/README* $module_name/readme.txt*)
if [ -f "$cur_file" ]; then
if [ -f $module_name/readme.txt ] ; then
cur_file="$module_name/readme.txt"
elif [ -f $module_name/README ] ; then
cur_file="$module_name/README"
fi
if [ -n "$cur_file" ]; then
# write index.html entry
text="<h2><a href=\"${module_name}.html\">${module_name}</a></h2>\n"
text="${text}$(head -n1 $cur_file | proc_text )"
@@ -101,7 +109,7 @@ for module_name in *; do
header "$module_name" "<a href=\"index.html\">LibreOffice</a> &raquo; ${module_name}" "$BASE_OUTPUT/${module_name}.html"
text="<p><b>View module in:</b>"
text="${text} &nbsp; <a href=\"http://cgit.freedesktop.org/libreoffice/core/tree/${module_name}\">cgit</a>"
if $(echo $INPUT_PROJECTS | grep -q $module_name); then
if [ -d ./docs/${module_name} ] ; then
text="${text} &nbsp; <a href=\"${module_name}/html/classes.html\">Doxygen</a>"
fi
text="${text} </p><p>&nbsp;</p>"