1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 06:08:21 +00:00

Add extra entry to the end of the saved branches and versions such that PHP's explode() subroutine can correctly disentangle the first three entries and does not get confused by the newline character at the end of the FTL version/branch...

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2017-12-23 00:42:41 +01:00
parent d43ad263ea
commit 8ed75dd176
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

View File

@ -47,7 +47,7 @@ if [[ "$2" == "remote" ]]; 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)")"
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 "${GITHUB_CORE_VERSION} ${GITHUB_WEB_VERSION} ${GITHUB_FTL_VERSION}" > "/etc/pihole/GitHubVersions" echo "${GITHUB_CORE_VERSION} ${GITHUB_WEB_VERSION} ${GITHUB_FTL_VERSION} X" > "/etc/pihole/GitHubVersions"
else else
@ -55,12 +55,12 @@ else
WEB_BRANCH="$(get_local_branch /var/www/html/admin)" WEB_BRANCH="$(get_local_branch /var/www/html/admin)"
FTL_BRANCH="$(pihole-FTL branch)" FTL_BRANCH="$(pihole-FTL branch)"
echo "${CORE_BRANCH} ${WEB_BRANCH} ${FTL_BRANCH}" > "/etc/pihole/localbranches" echo "${CORE_BRANCH} ${WEB_BRANCH} ${FTL_BRANCH} X" > "/etc/pihole/localbranches"
CORE_VERSION="$(get_local_version /etc/.pihole)" CORE_VERSION="$(get_local_version /etc/.pihole)"
WEB_VERSION="$(get_local_version /var/www/html/admin)" WEB_VERSION="$(get_local_version /var/www/html/admin)"
FTL_VERSION="$(pihole-FTL version)" FTL_VERSION="$(pihole-FTL version)"
echo "${CORE_VERSION} ${WEB_VERSION} ${FTL_VERSION}" > "/etc/pihole/localversions" echo "${CORE_VERSION} ${WEB_VERSION} ${FTL_VERSION} X" > "/etc/pihole/localversions"
fi fi