Skip to content

Commit

Permalink
Fixed bad version comparison
Browse files Browse the repository at this point in the history
* Fixed bad/duplicated version comparison that caused updates to not initiate
* Minor verbose logging tweaks
  • Loading branch information
michealespinola authored Aug 30, 2024
1 parent a97687c commit b7a7f43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions syno.plexupdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exec > >(tee "$SrceFllPth.log") 2>"$SrceFllPth.debug"
set -x

# SCRIPT VERSION
SPUScrpVer=4.6.2
SPUScrpVer=4.6.3
MinDSMVers=7.0
# PRINT OUR GLORIOUS HEADER BECAUSE WE ARE FULL OF OURSELVES
printf "\n"
Expand Down Expand Up @@ -338,12 +338,12 @@ printf '%16s %s\n' "Synology:" "$SynoHModel ($ArchFamily), DSM $DSMVersi
printf '%16s %s\n' "Plex Dir:" "$(fold -w 72 -s < <(printf '%s' "$PlexFolder") | sed '2,$s/^/ /')"
printf '%16s %s\n' "Running Ver:" "$RunVersion"
if [ "$NewVersion" != "" ]; then
printf '%16s %s\n' "Online Ver:" "$NewVersion ($DSMplexNID $ChannlName Channel)"
printf '%16s %s\n' "Online Ver:" "$NewVersion ($ChannlName Channel for $DSMplexNID)"
printf '%16s %s\n' "Released:" "$(date --rfc-3339 seconds --date @"$NewVerDate") ($PackageAge+ days old)"
fi

# COMPARE PLEX VERSIONS
if /usr/bin/dpkg --compare-versions "$NowVersion" gt "$RunVersion"; then
if /usr/bin/dpkg --compare-versions "$NewVersion" gt "$RunVersion"; then
printf '%17s%s\n' '' "* Newer version found!"
printf "\n"
printf '%16s %s\n' "New Package:" "$NewPackage"
Expand Down

0 comments on commit b7a7f43

Please sign in to comment.