1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 14:58:08 +00:00

Merge pull request #2437 from pi-hole/fix/version-files-overwritten

Append versions (after the first) instead of overwriting in updatecheck
This commit is contained in:
Mark Drobnak 2018-10-01 11:21:29 -04:00 committed by GitHub
commit ff925a7578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,11 +54,11 @@ if [[ "$2" == "remote" ]]; 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)")"
echo -n " ${GITHUB_WEB_VERSION}" > "${GITHUB_VERSION_FILE}"
echo -n " ${GITHUB_WEB_VERSION}" >> "${GITHUB_VERSION_FILE}"
fi
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
@ -69,11 +69,11 @@ else
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
WEB_BRANCH="$(get_local_branch /var/www/html/admin)"
echo -n " ${WEB_BRANCH}" > "${LOCAL_BRANCH_FILE}"
echo -n " ${WEB_BRANCH}" >> "${LOCAL_BRANCH_FILE}"
fi
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"
@ -82,10 +82,10 @@ else
if [[ "${INSTALL_WEB_INTERFACE}" == true ]]; then
WEB_VERSION="$(get_local_version /var/www/html/admin)"
echo -n " ${WEB_VERSION}" > "${LOCAL_VERSION_FILE}"
echo -n " ${WEB_VERSION}" >> "${LOCAL_VERSION_FILE}"
fi
FTL_VERSION="$(pihole-FTL version)"
echo -n " ${FTL_VERSION}" > "${LOCAL_VERSION_FILE}"
echo -n " ${FTL_VERSION}" >> "${LOCAL_VERSION_FILE}"
fi