mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
simple-adblock: bugfix: update config; use command -v
Signed-off-by: Stan Grishin <stangri@melmac.net>
This commit is contained in:
@@ -247,10 +247,10 @@ load_package_config() {
|
||||
. /lib/functions/network.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
# Prefer curl because it supports the file:// scheme.
|
||||
if [ -x /usr/bin/curl ]; then
|
||||
if command -v curl >/dev/null 2>&1; then
|
||||
dl_command="curl --insecure --retry $curlRetry --connect-timeout $dlTimeout --silent"
|
||||
dl_flag="-o"
|
||||
elif wget --version 2>/dev/null | grep -q "+https"; then
|
||||
elif command -v wget >/dev/null 2>&1 && wget --version 2>/dev/null | grep -q "+https"; then
|
||||
dl_command="wget --no-check-certificate --timeout $dlTimeout -q"
|
||||
dl_flag="-O"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user