Improve regex

This commit is contained in:
Ben Edgington
2022-03-18 17:10:21 +00:00
parent f8acc52c59
commit f24bd1302f

View File

@@ -10,11 +10,11 @@ do
echo $x;
# Include credentials for github.com
[[ "$x" =~ .*github.com* ]] && creds="-u $github_secret" || creds=""
[[ "$x" =~ github.com ]] && creds="-u $github_secret" || creds=""
# beaconcha.in doesn't like HEAD requests
[[ "$x" =~ .*beaconcha.in* ]] && head="" || head="--head"
[[ "$x" =~ beaconcha.in ]] && head="" || head="--head"
res=$(curl $creds -Lo /dev/null --silent $head --write-out '%{http_code}\n' $x)
if [ "200" -ne "$res" ]