mirror of https://github.com/Zelo72/rpi
build auto-update
This commit is contained in:
parent
c3d4bedd96
commit
7ac962d4f9
File diff suppressed because it is too large
Load Diff
|
@ -295,12 +295,12 @@ convertWhiteToAdblock() {
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "${domain:0:2}" == "*." ]; then
|
if [ "${domain:0:2}" == "*." ]; then
|
||||||
echo "@@||$(echo "$domain" | sed 's/^\*\.//')^" >>"$2"
|
echo "@@||$(echo "$domain" | sed 's/^\*\.//')^|" >>"$2"
|
||||||
else
|
else
|
||||||
if [[ $domain =~ \* ]]; then
|
if [[ $domain =~ \* ]]; then
|
||||||
echo "@@/$domain/" >>"$2"
|
echo "@@/$domain/" >>"$2"
|
||||||
else
|
else
|
||||||
echo "@@|$domain^" >>"$2"
|
echo "@@|$domain^|" >>"$2"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done <"$1"
|
done <"$1"
|
||||||
|
@ -525,11 +525,8 @@ echo ""
|
||||||
# Build Adblock whitelist
|
# Build Adblock whitelist
|
||||||
if inConfig "adblockwhite"; then
|
if inConfig "adblockwhite"; then
|
||||||
if [ -s "$white" ]; then
|
if [ -s "$white" ]; then
|
||||||
cat <"$white" >>"$domains".whitelist.adblock
|
convertWhiteToAdblock "$white" "$sourcedir"/exceptions.txt
|
||||||
fi
|
fi
|
||||||
getDomainsFromList "$whitelists" "$domains".whitelist.adblock 0 0
|
|
||||||
convertWhiteToAdblock "$domains".whitelist.adblock "$sourcedir"/exceptions.txt
|
|
||||||
rm -f "$domains".whitelist.adblock
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printDecCount
|
printDecCount
|
||||||
|
@ -661,7 +658,11 @@ echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$outdir" || exit
|
cd "$outdir" || exit
|
||||||
hostlist-compiler -c "$json" -o "$adblock"
|
if inConfig "verbose"; then
|
||||||
|
hostlist-compiler -v -c "$json" -o "$adblock"
|
||||||
|
else
|
||||||
|
hostlist-compiler -c "$json" -o "$adblock"
|
||||||
|
fi
|
||||||
rm -f "$adblock".raw
|
rm -f "$adblock".raw
|
||||||
cd "$sourcedir" || exit
|
cd "$sourcedir" || exit
|
||||||
|
|
||||||
|
@ -701,6 +702,8 @@ echo ""
|
||||||
|
|
||||||
if inConfig "white" || inConfig "dead"; then
|
if inConfig "white" || inConfig "dead"; then
|
||||||
cp "$domains" "$repodata"/"$name".list
|
cp "$domains" "$repodata"/"$name".list
|
||||||
|
elif inConfig "block"; then
|
||||||
|
cp "$domains" "$repodata"/"$name".list.block
|
||||||
elif inConfig "black"; then
|
elif inConfig "black"; then
|
||||||
cp "$domains" "$repodata"/"$name".list
|
cp "$domains" "$repodata"/"$name".list
|
||||||
cp "$domains".whitelist.removed "$repodata"/"$name".list.wl.removed
|
cp "$domains".whitelist.removed "$repodata"/"$name".list.wl.removed
|
||||||
|
|
|
@ -38,12 +38,12 @@ convertWhiteToAdBlock() {
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "${domain:0:2}" == "*." ]; then
|
if [ "${domain:0:2}" == "*." ]; then
|
||||||
echo "@@||$(echo "$domain" | sed 's/^\*\.//')^" >>"$2"
|
echo "@@||$(echo "$domain" | sed 's/^\*\.//')^|" >>"$2"
|
||||||
else
|
else
|
||||||
if [[ $domain =~ \* ]]; then
|
if [[ $domain =~ \* ]]; then
|
||||||
echo "@@/$domain/" >>"$2"
|
echo "@@/$domain/" >>"$2"
|
||||||
else
|
else
|
||||||
echo "@@|$domain^" >>"$2"
|
echo "@@|$domain^|" >>"$2"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done <"$1"
|
done <"$1"
|
||||||
|
@ -102,6 +102,9 @@ curl -s -L https://raw.githubusercontent.com/AdguardTeam/AdGuardSDNSFilter/maste
|
||||||
grep -Ev '^\s*$|^#|^!' | sed 's/[\|^]//g' | sed 's/$important//' |
|
grep -Ev '^\s*$|^#|^!' | sed 's/[\|^]//g' | sed 's/$important//' |
|
||||||
grep -P "$regex" >>$tmp
|
grep -P "$regex" >>$tmp
|
||||||
|
|
||||||
|
curl -s -L https://raw.githubusercontent.com/AdguardTeam/AdGuardSDNSFilter/master/Filters/exclusions.txt |
|
||||||
|
grep -Ev '^\s*$|^#|^!|^\||^\/' | grep -P "$regex" | sed -e 's/^/*./' >>$tmp
|
||||||
|
|
||||||
curl -s -L https://raw.githubusercontent.com/AdguardTeam/AdGuardSDNSFilter/master/Filters/exceptions.txt |
|
curl -s -L https://raw.githubusercontent.com/AdguardTeam/AdGuardSDNSFilter/master/Filters/exceptions.txt |
|
||||||
grep -P '^\@\@' | sed 's/[\|^\@]//g' | sed 's/$important//' |
|
grep -P '^\@\@' | sed 's/[\|^\@]//g' | sed 's/$important//' |
|
||||||
grep -P "$regex" >>$tmp
|
grep -P "$regex" >>$tmp
|
||||||
|
|
Loading…
Reference in New Issue