From d55012f7245c5e4bbbb47dde9623b1de9833ffbf Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sun, 30 Sep 2018 20:56:44 -0400 Subject: [PATCH] Append versions (after the first) instead of overwriting in updatecheck Fixes an issue brought up in #2435 Signed-off-by: Mcat12 --- advanced/Scripts/updatecheck.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/advanced/Scripts/updatecheck.sh b/advanced/Scripts/updatecheck.sh index 16b0d707..1d741283 100755 --- a/advanced/Scripts/updatecheck.sh +++ b/advanced/Scripts/updatecheck.sh @@ -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