mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Tidy up For loops, clean up whitespace
This commit is contained in:
parent
36645d9335
commit
2d08217173
1 changed files with 469 additions and 473 deletions
|
@ -491,11 +491,9 @@ installScripts() {
|
|||
|
||||
#Tidy up /usr/local/bin directory if installing over previous install.
|
||||
oldFiles=( gravity chronometer whitelist blacklist piholeLogFlush updateDashboard uninstall setupLCD piholeDebug)
|
||||
for i in "${oldFiles[@]}"
|
||||
do
|
||||
:
|
||||
for i in "${oldFiles[@]}"; do
|
||||
if [ -f "/usr/local/bin/$i.sh" ]; then
|
||||
$SUDO rm /usr/local/bin/$i.sh
|
||||
$SUDO rm /usr/local/bin/"$i".sh
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -560,9 +558,7 @@ checkForDependencies() {
|
|||
echo "::: Checking dependencies:"
|
||||
|
||||
dependencies=( dnsutils bc toilet figlet dnsmasq lighttpd php5-common php5-cgi php5 git curl unzip wget )
|
||||
for i in "${dependencies[@]}"
|
||||
do
|
||||
:
|
||||
for i in "${dependencies[@]}"; do
|
||||
echo -n "::: Checking for $i..."
|
||||
if [ "$(dpkg-query -W -f='${Status}' "$i" 2>/dev/null | grep -c "ok installed")" -eq 0 ]; then
|
||||
echo -n " Not found! Installing...."
|
||||
|
|
Loading…
Reference in a new issue