Test for format of tag version.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2017-02-20 11:49:20 -08:00
parent 5e6f8489a9
commit e087797edc
No known key found for this signature in database
GPG key ID: 572E999E385B7BFC

View file

@ -1160,7 +1160,8 @@ FTLinstall() {
echo -n "::: Installing FTL ... "
latesttag=$(curl -sI https://github.com/pi-hole/FTL/releases/latest | grep "Location" | awk -F '/' '{print $NF}')
if [ ! "${latesttag}" ]; then
# Tags should always start with v, check for that.
if [[ ! "${latesttag}" == v* ]]; then
echo "failed (error in getting latest release location from GitHub)"
return 1
fi