X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Fdocs-build.sh;h=af31d7a39ec982bb5e89a1d792072ed3c7bd126c;hb=382b9a9d05ab70ff995a7f862089e0a5f911fbf9;hp=99c5aea86373b82f09a159ec57332ded6ed671cd;hpb=65a20fd8c00a8119f23e6bbace802ee430e6129f;p=releng.git diff --git a/utils/docs-build.sh b/utils/docs-build.sh index 99c5aea86..af31d7a39 100755 --- a/utils/docs-build.sh +++ b/utils/docs-build.sh @@ -61,15 +61,18 @@ function check_rst_doc() { function add_html_notes() { _src="$1" - if grep -e ' _sha1_' "$_src"/*.rst ; then - # TODO: remove this, once old templates were removed from all repos. - echo - echo "Warn: '_sha1_' was found, use the latest document template." - echo " See https://wiki.opnfv.org/documentation/tools ." - echo - sed -i "s/ _sha1_/ $git_sha1/g" "$_src"/*.rst - fi - sed -i -e "\$a\\\n.. only:: html\n$html_notes" "$_src"/*.rst + find "$_src" -name '*.rst' | while read file + do + if grep -q -e ' _sha1_' "$file" ; then + # TODO: remove this, once old templates were removed from all repos. + echo + echo "Warn: '_sha1_' was found in [$file], use the latest document template." + echo " See https://wiki.opnfv.org/documentation/tools ." + echo + sed -i "s/ _sha1_/ $git_sha1/g" "$file" + fi + sed -i -e "\$a\\\n.. only:: html\n$html_notes" "$file" + done } function prepare_src_files() {