mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-14 02:26:56 -07:00
Remove REDHAT variable and use DISTRO instead
This commit is contained in:
parent
1aba28a7f0
commit
3e25035a19
2 changed files with 8 additions and 10 deletions
|
@ -226,7 +226,7 @@ isNewerVersion() {
|
|||
}
|
||||
|
||||
parseVersion() {
|
||||
if [ "${REDHAT}" = "yes" ]; then
|
||||
if [ "${DISTRO}" = "redhat" ]; then
|
||||
cut -f2- -d- <<< "$1" | cut -f1-4 -d.
|
||||
elif [ "${DISTRO}" = "synology" ]; then
|
||||
cut -f2-3 -d- <<< "$1"
|
||||
|
@ -236,11 +236,11 @@ parseVersion() {
|
|||
}
|
||||
|
||||
getPlexVersion() {
|
||||
if [ "${DISTRO}" = "synology" ]; then
|
||||
synopkg version "Plex Media Server" 2>/dev/null
|
||||
elif [ "${REDHAT}" != "yes" ]; then
|
||||
if [ "${DISTRO}" = "debian" ]; then
|
||||
dpkg-query --showformat='${Version}' --show plexmediaserver 2>/dev/null
|
||||
elif hash rpm 2>/dev/null; then
|
||||
elif [ "${DISTRO}" = "synology" ]; then
|
||||
synopkg version "Plex Media Server" 2>/dev/null
|
||||
elif [ "${DISTRO}" = "redhat" ]; then
|
||||
local rpmtemp
|
||||
if rpmtemp=$(rpm -q plexmediaserver); then
|
||||
parseVersion "$rpmtemp"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue