From 0bd03f8ff9f525b5b9dfe1c97a499bc63c9a4c1e Mon Sep 17 00:00:00 2001 From: Andrew Parker Date: Thu, 5 Feb 2015 23:56:07 -0700 Subject: [PATCH] Use the [[ ]] operator to perform Pattern Matching. Otherwise the expression will never be true. --- plexupdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index 46b4838..fdc09da 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -211,7 +211,7 @@ 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" ]; then + 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 5 fi