Signed-off-by: Subhaditya Nath <sn03.general@gmail.com>
This commit is contained in:
Subhaditya Nath 2021-08-15 17:43:20 +05:30
parent 98867d8d71
commit e8079620f5

View file

@ -91,11 +91,19 @@ getRemoteVersion(){
#If the above file exists, then we can read from that. Prevents overuse of GitHub API
if [[ -f "$cachedVersions" ]]; then
IFS=' ' read -r -a arrCache < "$cachedVersions"
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
case $daemon in
"pi-hole" ) echo "${arrCache[0]}";;
"AdminLTE" ) echo "${arrCache[1]}";;
"FTL" ) echo "${arrCache[2]}";;
esac
else
case $daemon in
"pi-hole" ) echo "${arrCache[0]}";;
"FTL" ) echo "${arrCache[1]}";;
esac
fi
return 0
fi
@ -140,6 +148,11 @@ getLocalBranch(){
}
versionOutput() {
[[ "$1" == "AdminLTE" ]] && [[ "${INSTALL_WEB_INTERFACE}" != true ]] && {
echo " WebAdmin not installed"
return 1
}
[[ "$1" == "pi-hole" ]] && GITDIR=$COREGITDIR
[[ "$1" == "AdminLTE" ]] && GITDIR=$WEBGITDIR
[[ "$1" == "FTL" ]] && GITDIR="FTL"