mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
adblock: update 4.2.3-2
* correctly parse json objects with hyphens in the autodetection functions Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=adblock
|
PKG_NAME:=adblock
|
||||||
PKG_VERSION:=4.2.3
|
PKG_VERSION:=4.2.3
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
PKG_LICENSE:=GPL-3.0-or-later
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
|
||||||
|
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ f_dns() {
|
|||||||
if [ -z "${adb_dns}" ]; then
|
if [ -z "${adb_dns}" ]; then
|
||||||
utils="knot-resolver bind-server unbound-daemon dnsmasq-full dnsmasq-dhcpv6 dnsmasq"
|
utils="knot-resolver bind-server unbound-daemon dnsmasq-full dnsmasq-dhcpv6 dnsmasq"
|
||||||
for util in ${utils}; do
|
for util in ${utils}; do
|
||||||
if printf "%s" "${adb_packages}" | "${adb_jsoncmd}" -ql1 -e "@.packages.${util}" >/dev/null 2>&1; then
|
if printf "%s" "${adb_packages}" | "${adb_jsoncmd}" -ql1 -e "@.packages[\"${util}\"]" >/dev/null 2>&1; then
|
||||||
case "${util}" in
|
case "${util}" in
|
||||||
"knot-resolver")
|
"knot-resolver")
|
||||||
util="kresd"
|
util="kresd"
|
||||||
@@ -361,10 +361,11 @@ f_dns() {
|
|||||||
f_fetch() {
|
f_fetch() {
|
||||||
local util utils insecure
|
local util utils insecure
|
||||||
|
|
||||||
if [ -z "${adb_fetchutil}" ]; then
|
adb_fetchutil="$(command -v "${adb_fetchutil}")"
|
||||||
|
if [ ! -x "${adb_fetchutil}" ]; then
|
||||||
utils="aria2 curl wget-ssl libustream-openssl libustream-wolfssl libustream-mbedtls"
|
utils="aria2 curl wget-ssl libustream-openssl libustream-wolfssl libustream-mbedtls"
|
||||||
for util in ${utils}; do
|
for util in ${utils}; do
|
||||||
if printf "%s" "${adb_packages}" | "${adb_jsoncmd}" -ql1 -e "@.packages.${util}" >/dev/null 2>&1; then
|
if printf "%s" "${adb_packages}" | "${adb_jsoncmd}" -ql1 -e "@.packages[\"${util}\"]" >/dev/null 2>&1; then
|
||||||
case "${util}" in
|
case "${util}" in
|
||||||
"aria2")
|
"aria2")
|
||||||
util="aria2c"
|
util="aria2c"
|
||||||
@@ -378,7 +379,7 @@ f_fetch() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -x "$(command -v "${util}")" ]; then
|
if [ -x "$(command -v "${util}")" ]; then
|
||||||
adb_fetchutil="${util}"
|
adb_fetchutil="$(command -v "${util}")"
|
||||||
uci_set adblock global adb_fetchutil "${util}"
|
uci_set adblock global adb_fetchutil "${util}"
|
||||||
f_uci "adblock"
|
f_uci "adblock"
|
||||||
break
|
break
|
||||||
@@ -387,11 +388,9 @@ f_fetch() {
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -x "$(command -v "${adb_fetchutil}")" ]; then
|
[ ! -x "${adb_fetchutil}" ] && f_log "err" "download utility with SSL support not found, please set 'adb_fetchutil' manually"
|
||||||
f_log "err" "download utility with SSL support not found, please set 'adb_fetchutil' manually"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "${adb_fetchutil}" in
|
case "${adb_fetchutil##*/}" in
|
||||||
"aria2c")
|
"aria2c")
|
||||||
[ "${adb_fetchinsecure}" = "1" ] && insecure="--check-certificate=false"
|
[ "${adb_fetchinsecure}" = "1" ] && insecure="--check-certificate=false"
|
||||||
adb_fetchparm="${adb_fetchparm:-"${insecure} --timeout=20 --allow-overwrite=true --auto-file-renaming=false --log-level=warn --dir=/ -o"}"
|
adb_fetchparm="${adb_fetchparm:-"${insecure} --timeout=20 --allow-overwrite=true --auto-file-renaming=false --log-level=warn --dir=/ -o"}"
|
||||||
@@ -410,8 +409,6 @@ f_fetch() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
adb_fetchutil="$(command -v "${adb_fetchutil}")"
|
|
||||||
|
|
||||||
f_log "debug" "f_fetch ::: fetch_util: ${adb_fetchutil:-"-"}, fetch_parm: ${adb_fetchparm:-"-"}"
|
f_log "debug" "f_fetch ::: fetch_util: ${adb_fetchutil:-"-"}, fetch_parm: ${adb_fetchparm:-"-"}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user