Tidy up For loops, clean up whitespace

This commit is contained in:
Promofaux 2016-04-03 21:43:36 +01:00
parent 36645d9335
commit 2d08217173

View file

@ -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...."