From 86c1d9b88ee72501447b595858f3cc9bbbb290ef Mon Sep 17 00:00:00 2001 From: Geoff Appleby Date: Mon, 16 Aug 2021 16:10:35 -0700 Subject: [PATCH] Adjust version number parsing for Synology DSM7 --- plexupdate-core | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plexupdate-core b/plexupdate-core index 6f37336..c1b8def 100755 --- a/plexupdate-core +++ b/plexupdate-core @@ -228,8 +228,10 @@ isNewerVersion() { parseVersion() { if [ "${DISTRO}" = "redhat" ]; then cut -f2- -d- <<< "$1" | cut -f1-4 -d. - elif [ "${DISTRO}" = "synology" -o "${DISTRO}" = "synology-dsm7" ]; then + elif [ "${DISTRO}" = "synology" ]; then cut -f2-3 -d- <<< "$1" + elif [ "${DISTRO}" = "synology-dsm7" ]; then + cut -f2 -d- <<< "$1" else cut -f2 -d_ <<< "$1" fi @@ -241,7 +243,7 @@ getPlexVersion() { elif [ "${DISTRO}" = "synology" ]; then synopkg version "Plex Media Server" 2>/dev/null elif [ "${DISTRO}" = "synology-dsm7" ]; then - synopkg version "PlexMediaServer" 2>/dev/null + synopkg version "PlexMediaServer" 2>/dev/null | cut -f1 -d- elif [ "${DISTRO}" = "redhat" ]; then local rpmtemp if rpmtemp=$(rpm -q plexmediaserver); then