- Test for existence of remote non-master branch of FTL before attemtping to check for update

- Move some functions from checkout to basic-install
- provide helpful error message on downlaod not existing

Signed-off-by: Adam Warner <adamw@rner.email>
This commit is contained in:
Adam Warner 2018-05-01 21:59:12 +01:00
parent c102d359f8
commit a6e4b0fea5
No known key found for this signature in database
GPG key ID: F5410858022DA5EB
3 changed files with 104 additions and 84 deletions

View file

@ -133,8 +133,17 @@ main() {
FTL_update=true
echo -e " ${INFO} FTL:\\t\\t${COL_YELLOW}update available${COL_NC}"
else
case $? in
1)
echo -e " ${INFO} FTL:\\t\\t${COL_LIGHT_GREEN}up to date${COL_NC}"
;;
2)
echo -e " ${INFO} FTL:\\t\\t${COL_LIGHT_RED}Branch is not available.${COL_NC}\\n\\t\\t\\tUse ${COL_LIGHT_GREEN}pihole checkout ftl [branchname]${COL_NC} to switch to a valid branch."
;;
*)
echo -e " ${INFO} FTL:\\t\\t${COL_LIGHT_RED}Something has gone wrong, contact support${COL_NC}"
esac
FTL_update=false
echo -e " ${INFO} FTL:\\t\\t${COL_LIGHT_GREEN}up to date${COL_NC}"
fi
if [[ "${core_update}" == false && "${web_update}" == false && "${FTL_update}" == false ]]; then