mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-14 02:26:56 -07:00
Added detection of currently installed version.
This commit is contained in:
parent
e3953d13f1
commit
7e9cef860c
1 changed files with 11 additions and 1 deletions
|
@ -217,7 +217,17 @@ if [ $? -ne 0 ]; then
|
|||
exit 3
|
||||
fi
|
||||
|
||||
SKIPDOWNLOAD="no"
|
||||
SKIP_DOWNLOAD="no"
|
||||
|
||||
# Installed version detection (untested on Redhat)
|
||||
if [ "${REDHAT}" != "yes" ]; then
|
||||
INSTALLED_VERSION=$(dpkg-query -s plexmediaserver 2>/dev/null | grep -Po 'Version: \K.*')
|
||||
if [ $FILENAME == *$INSTALLED_VERSION* ] && [ "${FORCE}" != "yes" ]; then
|
||||
echo "Your OS reports the latest version of Plex ($INSTALLED_VERSION) is already installed. Use -f to force download."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "${DOWNLOADDIR}/${FILENAME}" -a "${FORCE}" != "yes" ]; then
|
||||
if [ "${AUTOINSTALL}" != "yes" ]; then
|
||||
echo "File already exists, won't download."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue