Update gravity.sh

Co-authored-by: yubiuser <ckoenig@posteo.de>
This commit is contained in:
Peter Russell 2022-04-20 10:43:56 +02:00 committed by GitHub
parent 1c28da7bbd
commit 325f20d5c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -529,7 +529,6 @@ parseList() {
# 2. Append ,adlistID to every line # 2. Append ,adlistID to every line
# 3. Remove trailing period (see https://github.com/pi-hole/pi-hole/issues/4701) # 3. Remove trailing period (see https://github.com/pi-hole/pi-hole/issues/4701)
# 4. Ensures there is a newline on the last line # 4. Ensures there is a newline on the last line
# 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}"
# Find (up to) five domains containing invalid characters (see above) # Find (up to) five domains containing invalid characters (see above)