1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 06:08:21 +00:00

Have to get latest tag via GitHub API for downloading the binaries

This commit is contained in:
DL6ER 2017-02-13 11:27:52 +01:00
parent 6018c0c2fc
commit fbe3dc0dcd
No known key found for this signature in database
GPG Key ID: BB8EC0BC77973A30

View File

@ -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() {