feat: add web_check(); a replacement for wget --spider

This commit is contained in:
Martin Wimpress 2024-04-20 11:01:00 +01:00 committed by Martin Wimpress
parent c7af18f0f4
commit 806b1a439f
1 changed files with 6 additions and 0 deletions

View File

@ -1529,6 +1529,12 @@ function web_redirect() {
fi
}
function web_check() {
local URL=""
URL=$(web_redirect "${1}")
curl --silent --location --head --output /dev/null --fail "${URL}"
}
function zsync_get() {
local DIR="${2}"
local FILE="${1##*/}"