diff --git a/doc/build.sh b/doc/build.sh index 1e8662ff..ef029045 100755 --- a/doc/build.sh +++ b/doc/build.sh @@ -67,6 +67,9 @@ fi echo echo 'Testing for broken links' echo +problematic_urls=' +https://www.gnu.org/licenses/agpl-3.0.html +' pushd "$BUILDROOT" >/dev/null WEBSITE='https://kernc\.github\.io/backtesting\.py' grep -PR '/dev/null 2>&1 || + echo "$url" + curl --silent --fail --retry 2 --retry-delay 2 --connect-timeout 10 \ + --user-agent 'Mozilla/5.0 Firefox 128' "$url" >/dev/null 2>&1 || + grep -qF "$url" <(echo "$problematic_urls") || die "broken link in $file: $url" done done