summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kulik <thomas.kulik@telekom.de>2020-11-18 15:07:29 +0100
committerThomas Kulik <thomas.kulik@telekom.de>2020-11-18 15:09:53 +0100
commited7d4f6222e4c50e8c90a0292e4482bb34c66fc7 (patch)
treeba4aa6c88ddc02a43892be70dbf8db18f19c6155
parent33cf98f667f339c13420468b9918636826500e30 (diff)
Issue-ID: DOC-686
fixed a problem for handling url for doc repo Signed-off-by: Thomas Kulik <thomas.kulik@telekom.de> Change-Id: I577267958b2cb2690c4a4b2a0c59912e6f0b4b07
-rwxr-xr-xtools/checkdocs.sh6
-rwxr-xr-xtools/checkrtd.sh11
2 files changed, 13 insertions, 4 deletions
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
@@ -72,8 +72,10 @@ fullcommand="${command} ${arguments}"
# print usage
function usage() {
echo " "
+ echo " checkdocs.sh Version ${script_version}"
+ echo " "
echo " USAGE: "
- echo " ./checkdocs.sh "
+ echo " ./checkdocs.sh <arguments> "
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