mirror of
https://github.com/linuxserver/docker-plex.git
synced 2026-01-18 18:38:14 +08:00
Merge pull request #85 from linuxserver/case_insensitive_version_check
use ",," instead of export and case switch
This commit is contained in:
commit
88c81df5ae
@ -100,6 +100,7 @@ Valid settings for VERSION are:-
|
||||
|
||||
## Versions
|
||||
|
||||
+ **03.01.17:** Use case insensitive version variable matching rather than export and make lowercase.
|
||||
+ **17.10.16:** Allow use of uppercase version variable
|
||||
+ **01.10.16:** Add TZ info to README.
|
||||
+ **09.09.16:** Add layer badges to README.
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# Check variable status
|
||||
export VERSION=$(echo "$VERSION" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# copy config on first run, regardless of update status
|
||||
[[ ! -e /etc/default/plexmediaserver ]] && \
|
||||
@ -90,9 +88,9 @@ fi
|
||||
INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' plexmediaserver)
|
||||
|
||||
# start update routine
|
||||
if [[ "$VERSION" = latest ]] || [[ "$VERSION" = plexpass ]] || [[ "$PLEXPASS" == "1" ]]; then
|
||||
if [[ "${VERSION,,}" = latest ]] || [[ "${VERSION,,}" = plexpass ]] || [[ "$PLEXPASS" == "1" ]]; then
|
||||
REMOTE_VERSION=$(curl -s "${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 )
|
||||
elif [[ "$VERSION" = public ]]; then
|
||||
elif [[ "${VERSION,,}" = public ]]; then
|
||||
PLEX_TOKEN=""
|
||||
REMOTE_VERSION=$(curl -s "${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 )
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user