From 925b5e7c1498b30909b3babccbc9c4f4cd160a78 Mon Sep 17 00:00:00 2001 From: 007revad <39733752+007revad@users.noreply.github.com> Date: Mon, 13 Mar 2023 16:29:17 +1100 Subject: [PATCH] Update syno_hdd_db.sh Fixed version check --- syno_hdd_db.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index 1963469..3336780 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -63,7 +63,8 @@ get_latest_release() { tag=$(get_latest_release "007revad/Synology_HDD_db") -if [[ ${tag:1} > "$scriptver" ]]; then +if ! printf "%s\n%s\n" "$tag" "$scriptver" | + sort --check --version-sort &> /dev/null ; then echo "There is a newer version of this script available." echo -e "Current version: ${scriptver}\nLatest version: ${tag:1}" echo "https://github.com/007revad/Synology_HDD_db/releases/latest"