diff options
author | Jacob van der Kolk | 2017-08-01 14:58:59 -0400 |
---|---|---|
committer | Jacob van der Kolk | 2017-08-01 14:58:59 -0400 |
commit | ddc82f30345dede90a3a6d79613bfda9859a57d0 (patch) | |
tree | 15a863021a0d6730dbe9d6897b28ff6d800e68b3 | |
parent | ef7961111098c83e0b228f276e03a06ab974f0a1 (diff) | |
download | aur-ddc82f30345dede90a3a6d79613bfda9859a57d0.tar.gz |
Version 0.999.5-1; Fixed issues with hostsblock-urlblock symlink; typo
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | hostsblock.changelog | 4 | ||||
-rwxr-xr-x | hostsblock.sh | 10 |
4 files changed, 16 insertions, 10 deletions
@@ -1,7 +1,7 @@ pkgbase = hostsblock pkgdesc = A script that downloads, sorts, and compiles multiple ad- and malware-blocking hosts files. - pkgver = 0.999.4 - pkgrel = 2 + pkgver = 0.999.5 + pkgrel = 1 url = http://gaenserich.github.com/hostsblock/ install = hostsblock.install changelog = hostsblock.changelog @@ -30,7 +30,7 @@ pkgbase = hostsblock source = hosts.head source = hostsblock.service source = hostsblock.timer - sha1sums = 344d904a3710e980d8a7770db210e8f3af7c409c + sha1sums = 798fe7d07a9fab689c44243b025f4bfa4da345ed sha1sums = d9db54fb078ff0e674a1f32a886ad29969830459 sha1sums = 30fdaad1ee0497b9b88b61cfbd958d20c644801b sha1sums = 11ab0a6bac002879a04872ec06a3611c32c80e1d @@ -1,7 +1,7 @@ # Maintainer/Originator: Jake VanderKolk <jakevanderkolk@gmail.com> pkgname=hostsblock -pkgver=0.999.4 -pkgrel=2 +pkgver=0.999.5 +pkgrel=1 pkgdesc="A script that downloads, sorts, and compiles multiple ad- and malware-blocking hosts files." arch=(any) url="http://gaenserich.github.com/hostsblock/" @@ -17,7 +17,7 @@ backup=('var/lib/hostsblock/hostsblock.conf' 'var/lib/hostsblock/black.list' 'va changelog=$pkgname.changelog install=$pkgname.install source=('hostsblock.sh' 'hostsblock.conf' 'black.list' 'white.list' 'hosts.head' 'hostsblock.service' 'hostsblock.timer') -sha1sums=('344d904a3710e980d8a7770db210e8f3af7c409c' +sha1sums=('798fe7d07a9fab689c44243b025f4bfa4da345ed' 'd9db54fb078ff0e674a1f32a886ad29969830459' '30fdaad1ee0497b9b88b61cfbd958d20c644801b' '11ab0a6bac002879a04872ec06a3611c32c80e1d' diff --git a/hostsblock.changelog b/hostsblock.changelog index f22ac4f0a51c..3d6f3515493f 100644 --- a/hostsblock.changelog +++ b/hostsblock.changelog @@ -1,5 +1,9 @@ See https://github.com/gaenserich/hostsblock/commits/master for a complete list of updates +Version 0.999.5 (Alpha 5) (01.08.2017) +*Fixed issues with hostsblock-urlblock symlink +*Fixed typo that prevented the annotation file from correctly writing + Version 0.999.4 (Alpha 4) (07.23.2017) *Massive simplification of script, removing excess verbosity options, combining hostsblock.sh with hostsblock-urlcheck.sh *Mandate that hostsblock now runs as unpriviledged user, i.e. 'hostsblock' (see hostsblock.conf) diff --git a/hostsblock.sh b/hostsblock.sh index 89224aec86df..721355bee508 100755 --- a/hostsblock.sh +++ b/hostsblock.sh @@ -77,11 +77,11 @@ _extract_entries() { } _check_url() { - _url_escaped=$(echo "$@" | sed "s/\./\\\./g") + which pigz &>/dev/null if [ $? -eq 0 ]; then - _matches=$(pigz -dc "$annotate" | grep -F " $_url_escaped ") + _matches=$(pigz -dc "$annotate" | grep -F " $@ ") else - _matches=$(gzip -dc "$annotate" | grep -F " $_url_escaped ") + _matches=$(gzip -dc "$annotate" | grep -F " $@ ") fi _block_matches=$(echo "$_matches" | grep -- "^$redirecturl" | sed "s/.* \!\(.*\)$/\1/g" | tr '\n' ',' | sed "s/,$//g") _redirect_matches=$(echo "$_matches" | grep -v "^$redirecturl" | \ @@ -280,6 +280,8 @@ if [ $_check -eq 1 ] || [ "${0##*/}" == "hostsblock-urlcheck" ]; then # URLCHECK [ -f "$tmpdir"/hostsblock/changed ] && rm -f "$tmpdir"/hostsblock/changed echo "Checking to see if url is blocked or not..." + # If run from symlink "hostsblock-urlcheck" _URL will not be set by getopts + [ "$_URL" == "" ] && _URL="$1" _check_url $(echo "$_URL" | sed -e "s/.*https*:\/\///g" -e "s/[\/?'\" :<>\(\)].*//g") if [ -f "$tmpdir"/hostsblock/changed ]; then if [ $_verbosity -ge 1 ]; then @@ -464,7 +466,7 @@ else # APPEND BLACKLIST ENTRIES while read _blacklistline; do - echo "$redirecturl $_blacklistline \! $blacklist" >> "$tmpdir"/"${annotate##*/}".tmp + echo "$redirecturl $_blacklistline \! $blacklist" >> "$tmpdir"/hostsblock/"${annotate##*/}".tmp grep -Fqx "$_blacklistline" "$hostsfile" || echo "$redirecturl $_blacklistline" >> "$hostsfile" done < "$blacklist" || _notify 1 "FAILED to append blacklisted entries to $hostsfile." |