Add light dashboard
[releng.git] / utils / docs-build.sh
index 7c444e3..39647a3 100755 (executable)
@@ -49,8 +49,8 @@ function check_rst_doc() {
     # Note: This check may fail in many jobs for building project docs, since
     #       the old sample has lines more than 120. We ignore failures on this
     #       check right now, but these have to be fixed before OPNFV B release.
-    _out=$(doc8 --max-line-length 120 --ignore D000 "$_src") || {
-        _msg='Error: rst validatino (doc8) has failed, please fix the following error(s).'
+    _out=$(doc8 --max-line-length 240 --ignore D000 "$_src") || {
+        _msg='Warning: rst validation (doc8) has failed, please fix the following error(s).'
         _errs=$(echo "$_out" | sed -n -e "/^$_src/s/^/    /p")
         echo
         echo -e "$_msg\n$_errs"
@@ -137,7 +137,11 @@ prepare_src_files
 find $DOCS_DIR -name $INDEX_RST -printf '%h\n' | while read dir
 do
     name=$(generate_name $dir)
-    src="$SRC_DIR/${dir#$DOCS_DIR/}"
+    if is_top_dir "$dir" ; then
+        src="$SRC_DIR"
+    else
+        src="$SRC_DIR/${dir#$DOCS_DIR/}"
+    fi
     build="$BUILD_DIR/$name"
     output="$OUTPUT_DIR/$name"
     conf="$src/conf.py"