File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ urls=$(grep -oP '(http|ftp|https):\/\/([a-zA-Z0-9_-]+(?:(?:\.[a-zA-Z0-9_-]+)+))(
3838fail_counter=0
3939
4040FAILED_LINKS=()
41+ CHECKED_LINKS=()
4142for item in $urls ; do
4243# echo $item
4344 skip=0
@@ -53,15 +54,18 @@ for item in $urls; do
5354 filename=$( echo " $item " | cut -d' :' -f1)
5455 url=$( echo " $item " | cut -d' :' -f2-)
5556 echo -n " Checking $url from file $filename "
56- if ! curl --head --silent --fail " $url " 2>&1 > /dev/null; then
57- echo -e " \033[0;31mNOT FOUND\033[32m\n"
57+ if [[ $( echo ${CHECKED_LINKS[@]} | fgrep -w $url ) ]]; then
58+ echo -e " \033[36malready checked\033[0m"
59+ elif ! curl --head --silent --fail " $url " 2>&1 > /dev/null; then
60+ echo -e " \033[0;31mNOT FOUND\033[0m"
5861 FAILED_LINKS+=(" $url from file $filename " )
5962 (( fail_counter= fail_counter+ 1 ))
6063 else
61- printf " \033[32mok\033[0m\n "
64+ echo -e " \033[32mok\033[0m"
6265 fi
66+ CHECKED_LINKS+=(" $url " )
6367done
6468
6569echo " Failed files:"
6670printf ' %s\n' " ${FAILED_LINKS[@]} "
67- exit $fail_counter
71+ exit $fail_counter
Original file line number Diff line number Diff line change 3333#include < fstream>
3434#include < iostream>
3535
36- const std::string RT_DOC_URL = " https://docs.universal-robots.com/Universal_Robots_ROS_Documentation/doc/"
37- " ur_client_library/doc/real_time.html" ;
36+ // clang-format off
37+ // We want to keep the URL in one line to avoid formatting issues. This will make it easier to
38+ // extract the URL for an automatic check.
39+ const std::string RT_DOC_URL = " https://docs.universal-robots.com/Universal_Robots_ROS_Documentation/doc/ur_client_library/doc/real_time.html" ;
40+ // clang-format on
3841
3942namespace urcl
4043{
You can’t perform that action at this time.
0 commit comments