File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 4141echo
4242echo ' Testing for broken links'
4343echo
44+ problematic_urls='
45+ https://www.gnu.org/licenses/agpl-3.0.html
46+ '
4447pushd " $BUILDROOT " > /dev/null
4548grep -PR ' <a .*?href=' |
4649 sed -E " s/:.*?<a .*?href=([\" '])(.*?)/\t\2/g" |
@@ -58,9 +61,12 @@ for line in sys.stdin.readlines():
5861 grep -v $' \t ' ' $' |
5962 while read -r line; do
6063 while IFS=$' \t ' read -r file url; do
64+ echo " $file : $url "
6165 [ -f " $url " ] ||
62- curl --silent --fail --retry 5 --retry-delay 5 --user-agent ' Mozilla/5.0 Firefox 61' " $url " > /dev/null 2>&1 ||
63- die " broken link in $file : $url "
66+ curl --silent --fail --retry 3 --retry-delay 1 --connect-timeout 10 \
67+ --user-agent ' Mozilla/5.0 Firefox 125' " $url " > /dev/null 2>&1 ||
68+ grep -qF " $url " <( echo " $problematic_urls " ) ||
69+ die " broken link in $file : $url "
6470 done
6571 done
6672popd > /dev/null
You can’t perform that action at this time.
0 commit comments