From: Thomas Kulik Date: Wed, 18 Nov 2020 14:07:29 +0000 (+0100) Subject: Issue-ID: DOC-686 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=doc.git;a=commitdiff_plain;h=ed7d4f6222e4c50e8c90a0292e4482bb34c66fc7 Issue-ID: DOC-686 fixed a problem for handling url for doc repo Signed-off-by: Thomas Kulik Change-Id: I577267958b2cb2690c4a4b2a0c59912e6f0b4b07 --- diff --git a/tools/checkdocs.sh b/tools/checkdocs.sh index f58e1f546..1f7f10be5 100755 --- a/tools/checkdocs.sh +++ b/tools/checkdocs.sh @@ -58,7 +58,7 @@ ### SHORT: curl -s 'https://gerrit.onap.org/r/projects/?d' | awk '{if(NR>1)print}' | jq -c '.[] | {id, state}' | sed -r 's:%2F:/:g; s:["{}]::g; s:id\:::; s:,state\::|:; /All-Projects/d; /All-Users/d' ### -script_version="1.1 (2020-11-17)" +script_version="1.2 (2020-11-18)" # save command for the restart with logging enabled command=$0 @@ -71,9 +71,11 @@ fullcommand="${command} ${arguments}" # print usage function usage() { + echo " " + echo " checkdocs.sh Version ${script_version}" echo " " echo " USAGE: " - echo " ./checkdocs.sh " + echo " ./checkdocs.sh " echo " " echo " ARGUMENTS: " echo " -u|--user username " diff --git a/tools/checkrtd.sh b/tools/checkrtd.sh index 8be384ccd..e626dd9c1 100755 --- a/tools/checkrtd.sh +++ b/tools/checkrtd.sh @@ -27,6 +27,7 @@ for line in "${array[@]}" do reponame=$(echo ${line} | cut -d "[" -f2 | cut -d "]" -f1) + #reponame="[${reponame}]" #echo "DBUG: reponame=${reponame}" # example line: [dmaap/messagerouter/messageservice]/docs/release-notes/release-notes.rst @@ -41,7 +42,12 @@ do # warning: path does not always contain "docs"! # line: [dmaap/messagerouter/messageservice]/docs/release-notes/release-notes.rst # output: release-notes/release-notes.html - url_file=$(echo ${line} | sed -r 's/^.+\]//' | sed -r 's/^.*docs\///' | sed -r 's/\.rst$/\.html/' ) + url_file=$(echo ${line} | sed -r 's/^.+\]//' | sed -r 's/^.*\/docs\///' | sed -r 's/\.rst$/\.html/' ) + + #echo "DBUG: line = ${line}" + #echo "DBUG: url_file = ${url_file}" + #echo "DBUG: url_repo = ${url_repo}" + #echo "DBUG: reponame = ${reponame}" # build the full url if [[ ${reponame} == "doc" ]]; then @@ -53,7 +59,8 @@ do url_start="https://docs.onap.org/projects/onap" url="${url_start}-${url_repo}/${url_lang}/${url_branch}/${url_file}" fi - #echo "DBUG: url=$url" + + #echo "DBUG: url = $url" # check with curl if html page is accessible (no content check!) # to prevent (server side) cached results a unique element is added to the request