mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-18 06:08:21 +00:00
Update gravity.sh
Co-authored-by: yubiuser <ckoenig@posteo.de>
This commit is contained in:
parent
aba5e884eb
commit
1c28da7bbd
@ -527,7 +527,8 @@ parseList() {
|
|||||||
# This sed does the following things:
|
# This sed does the following things:
|
||||||
# 1. Remove all domains containing invalid characters. Valid are: a-z, A-Z, 0-9, dot (.), minus (-), underscore (_)
|
# 1. Remove all domains containing invalid characters. Valid are: a-z, A-Z, 0-9, dot (.), minus (-), underscore (_)
|
||||||
# 2. Append ,adlistID to every line
|
# 2. Append ,adlistID to every line
|
||||||
# 3. Ensures there is a newline on the last line
|
# 3. Remove trailing period (see https://github.com/pi-hole/pi-hole/issues/4701)
|
||||||
|
# 4. Ensures there is a newline on the last line
|
||||||
# sed -e "/[^a-zA-Z0-9.\_-]/d;s/$/,${adlistID}/;/.$/a\\" "${src}" >> "${target}"
|
# sed -e "/[^a-zA-Z0-9.\_-]/d;s/$/,${adlistID}/;/.$/a\\" "${src}" >> "${target}"
|
||||||
# previous line modified 20/04/2022, see https://github.com/pi-hole/pi-hole/issues/4701
|
# previous line modified 20/04/2022, see https://github.com/pi-hole/pi-hole/issues/4701
|
||||||
sed -e "/[^a-zA-Z0-9.\_-]/d;s/\.$//;s/$/,${adlistID}/;/.$/a\\" "${src}" >> "${target}"
|
sed -e "/[^a-zA-Z0-9.\_-]/d;s/\.$//;s/$/,${adlistID}/;/.$/a\\" "${src}" >> "${target}"
|
||||||
|
Loading…
Reference in New Issue
Block a user