From fbe3dc0dcdbd833faf0489949af4e970a7333599 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 13 Feb 2017 11:27:52 +0100 Subject: [PATCH] Have to get latest tag via GitHub API for downloading the binaries --- automated install/basic-install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 936c845b..37fe469d 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1182,7 +1182,13 @@ FTLdownload() { binary="pihole-FTL-linux-x86_32" fi - curl -sSL "https://github.com/pi-hole/FTL/releases/latest/${binary}" -o "/opt/pihole/pihole-FTL" + latesttag=$(curl -s https://api.github.com/repos/pi-hole/FTL/releases/latest | grep "tag_name" | sed "s/.*: \"//;s/\",//;") + if [ ! "${latesttag}" ]; then + echo "Error in getting latest release tag from GitHub" + return 0 + fi + curl -sSL "https://github.com/pi-hole/FTL/releases/download/${latesttag}/${binary}" -o "/opt/pihole/pihole-FTL" + return 0 } FTLinstall() {