summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
baa0710)
modified output / retrieve non-cached results
Signed-off-by: Thomas Kulik <thomas.kulik@telekom.de>
Change-Id: I8e3baa318ee3ff4a03dd7340039df8f3bef6b49a
#!/bin/bash
#set -x # uncomment for bash script debugging
#!/bin/bash
#set -x # uncomment for bash script debugging
+# branch, e.g. "master" or "guilin"
+# logfile produced by checkdocs that contains the list of links
url_start="https://docs.onap.org/projects/onap"
url_lang="en"
url_branch=${branch}
url_start="https://docs.onap.org/projects/onap"
url_lang="en"
url_branch=${branch}
# "master" docs are available as "latest" in read-the-docs
if [ "${url_branch}" = "master" ]; then
# "master" docs are available as "latest" in read-the-docs
if [ "${url_branch}" = "master" ]; then
url="${url_start}-${url_repo}/${url_lang}/${url_branch}/${url_file}"
# check with curl if html page is accessible (no content check!)
url="${url_start}-${url_repo}/${url_lang}/${url_branch}/${url_file}"
# check with curl if html page is accessible (no content check!)
- curl --head --silent --fail "${url}" >/dev/null
+ # to prevent (server side) cached results a unique element is added to the request
+ curl --head --silent --fail "${url}?${unique}" >/dev/null
curl_result=$?
# "0" and "22" are expected as a curl result
if [ "${curl_result}" = "0" ]; then
curl_result=$?
# "0" and "22" are expected as a curl result
if [ "${curl_result}" = "0" ]; then
+ curl_result="accessible"
elif [ "${curl_result}" = "22" ]; then
elif [ "${curl_result}" = "22" ]; then
+ curl_result="NOT ACCESSIBLE"
- echo -e "DBUG: ${line}"
- echo -e "DBUG: ${curl_result} ${url}"
- echo " "
+ #echo -e "DBUG: ${line}"
+ #echo -e "DBUG: ${curl_result} ${url}"
+ #echo " "
+
+ echo "${line},${url},${curl_result}"