mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
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 <dl6er@dl6er.de>
This commit is contained in:
parent
465589c0fd
commit
d996e9c9ee
1 changed files with 4 additions and 2 deletions
|
@ -115,6 +115,9 @@ else
|
||||||
OVER="\\r\\033[K"
|
OVER="\\r\\033[K"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Define global binary variable
|
||||||
|
binary="tbd"
|
||||||
|
|
||||||
# A simple function that just echoes out our logo in ASCII format
|
# A simple function that just echoes out our logo in ASCII format
|
||||||
# This lets users know that it is a Pi-hole, LLC product
|
# This lets users know that it is a Pi-hole, LLC product
|
||||||
show_ascii_berry() {
|
show_ascii_berry() {
|
||||||
|
@ -2130,7 +2133,6 @@ clone_or_update_repos() {
|
||||||
# Download FTL binary to random temp directory and install FTL binary
|
# Download FTL binary to random temp directory and install FTL binary
|
||||||
FTLinstall() {
|
FTLinstall() {
|
||||||
# Local, named variables
|
# Local, named variables
|
||||||
local binary="${1}"
|
|
||||||
local latesttag
|
local latesttag
|
||||||
local str="Downloading and Installing FTL"
|
local str="Downloading and Installing FTL"
|
||||||
printf " %b %s..." "${INFO}" "${str}"
|
printf " %b %s..." "${INFO}" "${str}"
|
||||||
|
@ -2377,7 +2379,7 @@ FTLdetect() {
|
||||||
printf "\\n %b FTL Checks...\\n\\n" "${INFO}"
|
printf "\\n %b FTL Checks...\\n\\n" "${INFO}"
|
||||||
|
|
||||||
if FTLcheckUpdate ; then
|
if FTLcheckUpdate ; then
|
||||||
FTLinstall "${binary}" || return 1
|
FTLinstall || return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue