mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-29 01:23:18 +00:00
No need to determine the latest tag, we can just go direct
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net> Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
d14ee26d6a
commit
7be019ff52
1 changed files with 1 additions and 10 deletions
|
@ -2228,15 +2228,6 @@ FTLinstall() {
|
||||||
local str="Downloading and Installing FTL"
|
local str="Downloading and Installing FTL"
|
||||||
printf " %b %s..." "${INFO}" "${str}"
|
printf " %b %s..." "${INFO}" "${str}"
|
||||||
|
|
||||||
# Find the latest version tag for FTL
|
|
||||||
latesttag=$(curl --silent "https://api.github.com/repos/pi-hole/ftl/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
|
||||||
# Tags should always start with v, check for that.
|
|
||||||
if [[ ! "${latesttag}" == v* ]]; then
|
|
||||||
printf "%b %b %s\\n" "${OVER}" "${CROSS}" "${str}"
|
|
||||||
printf " %bError: Unable to get latest release location from GitHub%b\\n" "${COL_LIGHT_RED}" "${COL_NC}"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Move into the temp ftl directory
|
# Move into the temp ftl directory
|
||||||
pushd "$(mktemp -d)" > /dev/null || { printf "Unable to make temporary directory for FTL binary download\\n"; return 1; }
|
pushd "$(mktemp -d)" > /dev/null || { printf "Unable to make temporary directory for FTL binary download\\n"; return 1; }
|
||||||
|
|
||||||
|
@ -2257,7 +2248,7 @@ FTLinstall() {
|
||||||
|
|
||||||
# Determine which version of FTL to download
|
# Determine which version of FTL to download
|
||||||
if [[ "${ftlBranch}" == "master" ]];then
|
if [[ "${ftlBranch}" == "master" ]];then
|
||||||
url="https://github.com/pi-hole/FTL/releases/download/${latesttag%$'\r'}"
|
url="https://github.com/pi-hole/ftl/releases/latest/download"
|
||||||
else
|
else
|
||||||
url="https://ftl.pi-hole.net/${ftlBranch}"
|
url="https://ftl.pi-hole.net/${ftlBranch}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue