From d996e9c9eee0f075ffa844044d86a62932193374 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 24 Jan 2019 09:28:09 +0100 Subject: [PATCH] Fix inconsistent handling of binary variable. get_binary_variable() stores the result into a global variable we pass later on as argument to FTLinstall() and define a local variable with the same name. This is fixed by only using the globa variable in all places not. This is still not a very elegant solution but it is also not subject of the current PR. Signed-off-by: DL6ER --- automated install/basic-install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 990b1f34..f91363c9 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -115,6 +115,9 @@ else OVER="\\r\\033[K" fi +# Define global binary variable +binary="tbd" + # A simple function that just echoes out our logo in ASCII format # This lets users know that it is a Pi-hole, LLC product show_ascii_berry() { @@ -2130,7 +2133,6 @@ clone_or_update_repos() { # Download FTL binary to random temp directory and install FTL binary FTLinstall() { # Local, named variables - local binary="${1}" local latesttag local str="Downloading and Installing FTL" printf " %b %s..." "${INFO}" "${str}" @@ -2377,7 +2379,7 @@ FTLdetect() { printf "\\n %b FTL Checks...\\n\\n" "${INFO}" if FTLcheckUpdate ; then - FTLinstall "${binary}" || return 1 + FTLinstall || return 1 fi }