mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
remove redundant function and comments
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
77bfb3fb67
commit
edaee4e962
@ -74,14 +74,6 @@ Options:
|
|||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
EscapeRegexp() {
|
|
||||||
# This way we may safely insert an arbitrary
|
|
||||||
# string in our regular expressions
|
|
||||||
# This sed is intentionally executed in three steps to ease maintainability
|
|
||||||
# The first sed removes any amount of leading dots
|
|
||||||
echo $* | sed 's/^\.*//' | sed "s/[]\.|$(){}?+*^]/\\\\&/g" | sed "s/\\//\\\\\//g"
|
|
||||||
}
|
|
||||||
|
|
||||||
HandleOther() {
|
HandleOther() {
|
||||||
# Convert to lowercase
|
# Convert to lowercase
|
||||||
domain="${1,,}"
|
domain="${1,,}"
|
||||||
@ -122,7 +114,6 @@ ProcessDomainList() {
|
|||||||
|
|
||||||
AddDomain() {
|
AddDomain() {
|
||||||
local domain num requestedListname existingTypeId existingListname
|
local domain num requestedListname existingTypeId existingListname
|
||||||
# Use printf to escape domain. %q prints the argument in a form that can be reused as shell input
|
|
||||||
domain="$1"
|
domain="$1"
|
||||||
|
|
||||||
# Is the domain in the list we want to add it to?
|
# Is the domain in the list we want to add it to?
|
||||||
@ -157,7 +148,6 @@ AddDomain() {
|
|||||||
|
|
||||||
RemoveDomain() {
|
RemoveDomain() {
|
||||||
local domain num requestedListname
|
local domain num requestedListname
|
||||||
# Use printf to escape domain. %q prints the argument in a form that can be reused as shell input
|
|
||||||
domain="$1"
|
domain="$1"
|
||||||
|
|
||||||
# Is the domain in the list we want to remove it from?
|
# Is the domain in the list we want to remove it from?
|
||||||
|
Loading…
Reference in New Issue
Block a user