mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-14 02:26:56 -07:00
Merge pull request #14 from falcon15500/master
Add check for INSTALLED_VERSION for RHEL distros
This commit is contained in:
commit
387d8831a0
1 changed files with 6 additions and 4 deletions
|
@ -248,10 +248,12 @@ SKIP_DOWNLOAD="no"
|
|||
# Installed version detection (only supported for deb based systems, feel free to submit rpm equivalent)
|
||||
if [ "${REDHAT}" != "yes" ]; then
|
||||
INSTALLED_VERSION=$(dpkg-query -s plexmediaserver 2>/dev/null | grep -Po 'Version: \K.*')
|
||||
if [[ $FILENAME == *$INSTALLED_VERSION* ]] && [ "${FORCE}" != "yes" ] && [ ! -z "${INSTALLED_VERSION}" ]; then
|
||||
echo "Your OS reports the latest version of Plex ($INSTALLED_VERSION) is already installed. Use -f to force download."
|
||||
exit 5
|
||||
fi
|
||||
else
|
||||
INSTALLED_VERSION=$(rpm -qv plexmediaserver 2>/dev/null)
|
||||
fi
|
||||
if [[ $FILENAME == *$INSTALLED_VERSION* ]] && [ "${FORCE}" != "yes" ] && [ ! -z "${INSTALLED_VERSION}" ]; then
|
||||
echo "Your OS reports the latest version of Plex ($INSTALLED_VERSION) is already installed. Use -f to force download."
|
||||
exit 5
|
||||
fi
|
||||
|
||||
if [ -f "${DOWNLOADDIR}/${FILENAME}" -a "${FORCE}" != "yes" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue