Append versions (after the first) instead of overwriting in updatecheck

Fixes an issue brought up in #2435

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12 2018-09-30 20:56:44 -04:00
parent 46356d3027
commit d55012f724
No known key found for this signature in database
GPG key ID: ABB8FC9789AF524D

View file

@ -54,11 +54,11 @@ if [[ "$2" == "remote" ]]; then
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
GITHUB_WEB_VERSION="$(json_extract tag_name "$(curl -q 'https://api.github.com/repos/pi-hole/AdminLTE/releases/latest' 2> /dev/null)")" GITHUB_WEB_VERSION="$(json_extract tag_name "$(curl -q 'https://api.github.com/repos/pi-hole/AdminLTE/releases/latest' 2> /dev/null)")"
echo -n " ${GITHUB_WEB_VERSION}" > "${GITHUB_VERSION_FILE}" echo -n " ${GITHUB_WEB_VERSION}" >> "${GITHUB_VERSION_FILE}"
fi fi
GITHUB_FTL_VERSION="$(json_extract tag_name "$(curl -q 'https://api.github.com/repos/pi-hole/FTL/releases/latest' 2> /dev/null)")" GITHUB_FTL_VERSION="$(json_extract tag_name "$(curl -q 'https://api.github.com/repos/pi-hole/FTL/releases/latest' 2> /dev/null)")"
echo -n " ${GITHUB_FTL_VERSION}" > "${GITHUB_VERSION_FILE}" echo -n " ${GITHUB_FTL_VERSION}" >> "${GITHUB_VERSION_FILE}"
else else
@ -69,11 +69,11 @@ else
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
WEB_BRANCH="$(get_local_branch /var/www/html/admin)" WEB_BRANCH="$(get_local_branch /var/www/html/admin)"
echo -n " ${WEB_BRANCH}" > "${LOCAL_BRANCH_FILE}" echo -n " ${WEB_BRANCH}" >> "${LOCAL_BRANCH_FILE}"
fi fi
FTL_BRANCH="$(pihole-FTL branch)" FTL_BRANCH="$(pihole-FTL branch)"
echo -n " ${FTL_BRANCH}" > "${LOCAL_BRANCH_FILE}" echo -n " ${FTL_BRANCH}" >> "${LOCAL_BRANCH_FILE}"
LOCAL_VERSION_FILE="/etc/pihole/localversions" LOCAL_VERSION_FILE="/etc/pihole/localversions"
@ -82,10 +82,10 @@ else
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
WEB_VERSION="$(get_local_version /var/www/html/admin)" WEB_VERSION="$(get_local_version /var/www/html/admin)"
echo -n " ${WEB_VERSION}" > "${LOCAL_VERSION_FILE}" echo -n " ${WEB_VERSION}" >> "${LOCAL_VERSION_FILE}"
fi fi
FTL_VERSION="$(pihole-FTL version)" FTL_VERSION="$(pihole-FTL version)"
echo -n " ${FTL_VERSION}" > "${LOCAL_VERSION_FILE}" echo -n " ${FTL_VERSION}" >> "${LOCAL_VERSION_FILE}"
fi fi