mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-02-23 03:28:20 +00:00
Simplify cURL etag feature detection following discussion in #5873
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
68b03e114c
commit
37718c65e9
1 changed files with 4 additions and 9 deletions
13
gravity.sh
13
gravity.sh
|
@ -507,17 +507,12 @@ gravity_DownloadBlocklists() {
|
|||
echo -e " ${INFO} Libz compression not available\n"
|
||||
fi
|
||||
|
||||
# Check if etag is supported by the locally available version of curl by
|
||||
# comparing the version string being >= 7.68.0 (released Jan 2020)
|
||||
# https://github.com/curl/curl/pull/4543 followed by
|
||||
# Check if etag is supported by the locally available version of curl
|
||||
# (available as of curl 7.68.0, released Jan 2020)
|
||||
# https://github.com/curl/curl/pull/4543 +
|
||||
# https://github.com/curl/curl/pull/4678
|
||||
if echo "${curlVersion}" | grep -q "curl 7\.[6-9][8-9]"; then
|
||||
if curl --help all | grep -q "etag-save"; then
|
||||
etag_support=true
|
||||
else
|
||||
# Check if the version is >= 8
|
||||
if echo "${curlVersion}" | grep -q "curl 8"; then
|
||||
etag_support=true
|
||||
fi
|
||||
fi
|
||||
|
||||
# Loop through $sources and download each one
|
||||
|
|
Loading…
Add table
Reference in a new issue