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 41
41
echo
42
42
echo ' Testing for broken links'
43
43
echo
44
+ problematic_urls='
45
+ https://www.gnu.org/licenses/agpl-3.0.html
46
+ '
44
47
pushd " $BUILDROOT " > /dev/null
45
48
grep -PR ' <a .*?href=' |
46
49
sed -E " s/:.*?<a .*?href=([\" '])(.*?)/\t\2/g" |
@@ -58,9 +61,12 @@ for line in sys.stdin.readlines():
58
61
grep -v $' \t ' ' $' |
59
62
while read -r line; do
60
63
while IFS=$' \t ' read -r file url; do
64
+ echo " $file : $url "
61
65
[ -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 "
64
70
done
65
71
done
66
72
popd > /dev/null
You can’t perform that action at this time.
0 commit comments