mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-08 23:20:56 +00:00
Test for lexicographically less than tag version.
This commit is contained in:
parent
1d64ad1ccd
commit
34be601dd7
@ -111,7 +111,7 @@ main() {
|
|||||||
echo "::: Everything is up to date!"
|
echo "::: Everything is up to date!"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
elif [[ "${pihole_version_current}" == "${pihole_version_latest}" ]] && [[ "${web_version_current}" != "${web_version_latest}" ]]; then
|
elif [[ "${pihole_version_current}" == "${pihole_version_latest}" ]] && [[ "${web_version_current}" < "${web_version_latest}" ]]; then
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Pi-hole Web Admin files out of date"
|
echo "::: Pi-hole Web Admin files out of date"
|
||||||
getGitFiles "${ADMIN_INTERFACE_DIR}" "${ADMIN_INTERFACE_GIT_URL}"
|
getGitFiles "${ADMIN_INTERFACE_DIR}" "${ADMIN_INTERFACE_GIT_URL}"
|
||||||
@ -119,14 +119,14 @@ main() {
|
|||||||
web_version_current="$(/usr/local/bin/pihole -v -a -c)"
|
web_version_current="$(/usr/local/bin/pihole -v -a -c)"
|
||||||
web_updated=true
|
web_updated=true
|
||||||
|
|
||||||
elif [[ "${pihole_version_current}" != "${pihole_version_latest}" ]] && [[ "${web_version_current}" == "${web_version_latest}" ]]; then
|
elif [[ "${pihole_version_current}" < "${pihole_version_latest}" ]] && [[ "${web_version_current}" == "${web_version_latest}" ]]; then
|
||||||
echo "::: Pi-hole core files out of date"
|
echo "::: Pi-hole core files out of date"
|
||||||
getGitFiles "${PI_HOLE_FILES_DIR}" "${PI_HOLE_GIT_URL}"
|
getGitFiles "${PI_HOLE_FILES_DIR}" "${PI_HOLE_GIT_URL}"
|
||||||
/etc/.pihole/automated\ install/basic-install.sh --reconfigure --unattended || echo "Unable to complete update, contact Pi-hole" && exit 1
|
/etc/.pihole/automated\ install/basic-install.sh --reconfigure --unattended || echo "Unable to complete update, contact Pi-hole" && exit 1
|
||||||
pihole_version_current="$(/usr/local/bin/pihole -v -p -c)"
|
pihole_version_current="$(/usr/local/bin/pihole -v -p -c)"
|
||||||
core_updated=true
|
core_updated=true
|
||||||
|
|
||||||
elif [[ "${pihole_version_current}" != "${pihole_version_latest}" ]] && [[ "${web_version_current}" != "${web_version_latest}" ]]; then
|
elif [[ "${pihole_version_current}" < "${pihole_version_latest}" ]] && [[ "${web_version_current}" < "${web_version_latest}" ]]; then
|
||||||
echo "::: Updating Everything"
|
echo "::: Updating Everything"
|
||||||
getGitFiles "${PI_HOLE_FILES_DIR}" "${PI_HOLE_GIT_URL}"
|
getGitFiles "${PI_HOLE_FILES_DIR}" "${PI_HOLE_GIT_URL}"
|
||||||
/etc/.pihole/automated\ install/basic-install.sh --unattended || echo "Unable to complete update, contact Pi-hole" && exit 1
|
/etc/.pihole/automated\ install/basic-install.sh --unattended || echo "Unable to complete update, contact Pi-hole" && exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user