mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-19 12:59:40 -07:00
Update plex-core to support synology packages
checks DISTRO variable in getPlexVersion and parseVersion
This commit is contained in:
parent
54da6bca99
commit
9fc45daa26
1 changed files with 5 additions and 1 deletions
|
@ -228,13 +228,17 @@ isNewerVersion() {
|
||||||
parseVersion() {
|
parseVersion() {
|
||||||
if [ "${REDHAT}" = "yes" ]; then
|
if [ "${REDHAT}" = "yes" ]; then
|
||||||
cut -f2- -d- <<< "$1" | cut -f1-4 -d.
|
cut -f2- -d- <<< "$1" | cut -f1-4 -d.
|
||||||
|
elif [ "${DISTRO}" = "synology" ]; then
|
||||||
|
cut -f2 -d- <<< "$1"
|
||||||
else
|
else
|
||||||
cut -f2 -d_ <<< "$1"
|
cut -f2 -d_ <<< "$1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
getPlexVersion() {
|
getPlexVersion() {
|
||||||
if [ "${REDHAT}" != "yes" ]; then
|
if [ "${DISTRO}" = "synology" ]; then
|
||||||
|
synopkg version "Plex Media Server" 2>/dev/null
|
||||||
|
elif [ "${REDHAT}" != "yes" ]; then
|
||||||
dpkg-query --showformat='${Version}' --show plexmediaserver 2>/dev/null
|
dpkg-query --showformat='${Version}' --show plexmediaserver 2>/dev/null
|
||||||
elif hash rpm 2>/dev/null; then
|
elif hash rpm 2>/dev/null; then
|
||||||
local rpmtemp
|
local rpmtemp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue