diff options
author | Dirk Brenken <dev@brenken.org> | 2020-04-18 15:33:16 +0200 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2020-04-18 15:33:16 +0200 |
commit | e291d680558f40ae6d0d0a7006ac1991a6910d2f (patch) | |
tree | ddc0be260926384112eccc4951eab8fc1b056b99 /net/adblock | |
parent | eee8f19807b0cf432a4ebe80f72d35808e370420 (diff) |
adblock: filter spurious line endings in sources
* prevent processing of spurious line endings
that confuses (g)awk
Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'net/adblock')
-rw-r--r-- | net/adblock/Makefile | 2 | ||||
-rwxr-xr-x | net/adblock/files/adblock.sh | 14 |
2 files changed, 7 insertions, 9 deletions
diff --git a/net/adblock/Makefile b/net/adblock/Makefile index 2bc8c0080..1a4b7f556 100644 --- a/net/adblock/Makefile +++ b/net/adblock/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=adblock PKG_VERSION:=4.0.4 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org> diff --git a/net/adblock/files/adblock.sh b/net/adblock/files/adblock.sh index fd2bbffd4..4fa4902ca 100755 --- a/net/adblock/files/adblock.sh +++ b/net/adblock/files/adblock.sh @@ -1255,11 +1255,10 @@ f_main() then if [ -s "${adb_tmpdir}/tmp.rem.whitelist" ] then - "${adb_awk}" "${src_rset}" "${src_tmpload}" | \ - grep -Evf "${adb_tmpdir}/tmp.rem.whitelist" | \ - "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}" + "${adb_awk}" "${src_rset}" "${src_tmpload}" | sed "s/\r//g" | \ + grep -Evf "${adb_tmpdir}/tmp.rem.whitelist" | "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}" else - "${adb_awk}" "${src_rset}" "${src_tmpload}" | \ + "${adb_awk}" "${src_rset}" "${src_tmpload}" | sed "s/\r//g" | \ "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}" fi rm -f "${src_tmpload}" @@ -1294,11 +1293,10 @@ f_main() then if [ -s "${adb_tmpdir}/tmp.rem.whitelist" ] then - "${adb_awk}" "${src_rset}" "${src_tmpload}" | \ - grep -Evf "${adb_tmpdir}/tmp.rem.whitelist" | \ - "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}" + "${adb_awk}" "${src_rset}" "${src_tmpload}" | sed "s/\r//g" | \ + grep -Evf "${adb_tmpdir}/tmp.rem.whitelist" | "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}" else - "${adb_awk}" "${src_rset}" "${src_tmpload}" | \ + "${adb_awk}" "${src_rset}" "${src_tmpload}" | sed "s/\r//g" | \ "${adb_awk}" 'BEGIN{FS="."}{for(f=NF;f>1;f--)printf "%s.",$f;print $1}' > "${src_tmpsort}" fi rm -f "${src_tmpload}" |