diff --git a/gravity.sh b/gravity.sh index 276e59c2..f6d09ac5 100755 --- a/gravity.sh +++ b/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