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
|
||||
fi
|
||||
if [ "${domain:0:2}" == "*." ]; then
|
||||
echo "@@||$(echo "$domain" | sed 's/^\*\.//')^" >>"$2"
|
||||
echo "@@||$(echo "$domain" | sed 's/^\*\.//')^|" >>"$2"
|
||||
else
|
||||
if [[ $domain =~ \* ]]; then
|
||||
echo "@@/$domain/" >>"$2"
|
||||
else
|
||||
echo "@@|$domain^" >>"$2"
|
||||
echo "@@|$domain^|" >>"$2"
|
||||
fi
|
||||
fi
|
||||
done <"$1"
|
||||
|
@ -525,11 +525,8 @@ echo ""
|
|||
# Build Adblock whitelist
|
||||
if inConfig "adblockwhite"; then
|
||||
if [ -s "$white" ]; then
|
||||
cat <"$white" >>"$domains".whitelist.adblock
|
||||
convertWhiteToAdblock "$white" "$sourcedir"/exceptions.txt
|
||||
fi
|
||||
getDomainsFromList "$whitelists" "$domains".whitelist.adblock 0 0
|
||||
convertWhiteToAdblock "$domains".whitelist.adblock "$sourcedir"/exceptions.txt
|
||||
rm -f "$domains".whitelist.adblock
|
||||
fi
|
||||
|
||||
printDecCount
|
||||
|
@ -661,7 +658,11 @@ echo ""
|
|||
fi
|
||||
|
||||
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
|
||||
cd "$sourcedir" || exit
|
||||
|
||||
|
@ -701,6 +702,8 @@ echo ""
|
|||
|
||||
if inConfig "white" || inConfig "dead"; then
|
||||
cp "$domains" "$repodata"/"$name".list
|
||||
elif inConfig "block"; then
|
||||
cp "$domains" "$repodata"/"$name".list.block
|
||||
elif inConfig "black"; then
|
||||
cp "$domains" "$repodata"/"$name".list
|
||||
cp "$domains".whitelist.removed "$repodata"/"$name".list.wl.removed
|
||||
|
|
|
@ -38,12 +38,12 @@ convertWhiteToAdBlock() {
|
|||
continue
|
||||
fi
|
||||
if [ "${domain:0:2}" == "*." ]; then
|
||||
echo "@@||$(echo "$domain" | sed 's/^\*\.//')^" >>"$2"
|
||||
echo "@@||$(echo "$domain" | sed 's/^\*\.//')^|" >>"$2"
|
||||
else
|
||||
if [[ $domain =~ \* ]]; then
|
||||
echo "@@/$domain/" >>"$2"
|
||||
else
|
||||
echo "@@|$domain^" >>"$2"
|
||||
echo "@@|$domain^|" >>"$2"
|
||||
fi
|
||||
fi
|
||||
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 -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 |
|
||||
grep -P '^\@\@' | sed 's/[\|^\@]//g' | sed 's/$important//' |
|
||||
grep -P "$regex" >>$tmp
|
||||
|
|
Loading…
Reference in New Issue