From 56278c6394b5954245c66a76c3a6fd5158b0ac5e Mon Sep 17 00:00:00 2001
From: Adam Warner <adamw@rner.email>
Date: Mon, 2 Apr 2018 22:06:36 +0100
Subject: [PATCH] Fix shellcheck complaints

Signed-off-by: Adam Warner <adamw@rner.email>
---
 advanced/Scripts/update.sh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh
index ee168fc4..d80edca2 100755
--- a/advanced/Scripts/update.sh
+++ b/advanced/Scripts/update.sh
@@ -28,9 +28,12 @@ source "/opt/pihole/COL_TABLE"
 # make_repo() sourced from basic-install.sh
 # update_repo() source from basic-install.sh
 # getGitFiles() sourced from basic-install.sh
+# get_binary_name() sourced from basic-install.sh
+# FTLcheckUpdate() sourced from basic-install.sh
 
 GitCheckUpdateAvail() {
-  local directory="${1}"
+  local directory
+  directory="${1}"
   curdir=$PWD
   cd "${directory}" || return
 
@@ -78,8 +81,6 @@ GitCheckUpdateAvail() {
 }
 
 main() {
-  local pihole_version_current
-  local web_version_current
   local basicError="\\n  ${COL_LIGHT_RED}Unable to complete update, please contact Pi-hole Support${COL_NC}"
   local core_update
   local web_update
@@ -111,7 +112,7 @@ main() {
 
   get_binary_name > /dev/null # Needed so that we have the correct binary name for the FTL Update check function
 
-  if FTLcheckUpdate > /dev/null; then # Function is in sourced basic-install.sh
+  if FTLcheckUpdate > /dev/null; then
     FTL_update=true
     echo -e "  ${INFO} FTL:\\t\\t${COL_YELLOW}update available${COL_NC}"
   else