Consistency

We went with tabs earlier, may as well make that the "standard".
Easy enough to switch to spaces too if that's desired with expand(1)
This commit is contained in:
Marcus Hildum 2016-10-21 23:17:14 -07:00
parent ebbe1fc236
commit 640398ced4

33
pihole
View file

@ -66,8 +66,7 @@ setupLCDFunction() {
queryFunc() { queryFunc() {
domain=$2 domain=$2
for list in /etc/pihole/list.* for list in /etc/pihole/list.*; do
do
count=$(grep ${domain} $list | wc -l) count=$(grep ${domain} $list | wc -l)
echo "::: ${list} (${count} results)" echo "::: ${list} (${count} results)"
if [[ ${count} > 0 ]]; then if [[ ${count} > 0 ]]; then
@ -125,19 +124,19 @@ if [[ $# = 0 ]]; then
fi fi
# Handle redirecting to specific functions based on arguments # Handle redirecting to specific functions based on arguments
case "$1" in case "${1}" in
"-w" | "whitelist" ) whitelistFunc "$@";; "-w" | "whitelist" ) whitelistFunc "$@";;
"-b" | "blacklist" ) blacklistFunc "$@";; "-b" | "blacklist" ) blacklistFunc "$@";;
"-d" | "debug" ) debugFunc;; "-d" | "debug" ) debugFunc;;
"-f" | "flush" ) flushFunc;; "-f" | "flush" ) flushFunc;;
"-up" | "updatePihole" ) updatePiholeFunc;; "-up" | "updatePihole" ) updatePiholeFunc;;
"-r" | "reconfigure" ) reconfigurePiholeFunc;; "-r" | "reconfigure" ) reconfigurePiholeFunc;;
"-g" | "updateGravity" ) updateGravityFunc "$@";; "-g" | "updateGravity" ) updateGravityFunc "$@";;
"-s" | "setupLCD" ) setupLCDFunction;; "-s" | "setupLCD" ) setupLCDFunction;;
"-c" | "chronometer" ) chronometerFunc "$@";; "-c" | "chronometer" ) chronometerFunc "$@";;
"-h" | "help" ) helpFunc;; "-h" | "help" ) helpFunc;;
"-v" | "version" ) versionFunc "$@";; "-v" | "version" ) versionFunc "$@";;
"-q" | "query" ) queryFunc "$@";; "-q" | "query" ) queryFunc "$@";;
"uninstall" ) uninstallFunc;; "uninstall" ) uninstallFunc;;
* ) helpFunc;; * ) helpFunc;;
esac esac