use ",," instead of export and case switch
This commit is contained in:
parent
dc8483ee93
commit
346d0ef4dd
2 changed files with 3 additions and 4 deletions
|
|
@ -100,6 +100,7 @@ Valid settings for VERSION are:-
|
||||||
|
|
||||||
## Versions
|
## 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
|
+ **17.10.16:** Allow use of uppercase version variable
|
||||||
+ **01.10.16:** Add TZ info to README.
|
+ **01.10.16:** Add TZ info to README.
|
||||||
+ **09.09.16:** Add layer badges to README.
|
+ **09.09.16:** Add layer badges to README.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
# Check variable status
|
|
||||||
export VERSION=$(echo "$VERSION" | tr '[:upper:]' '[:lower:]')
|
|
||||||
|
|
||||||
# copy config on first run, regardless of update status
|
# copy config on first run, regardless of update status
|
||||||
[[ ! -e /etc/default/plexmediaserver ]] && \
|
[[ ! -e /etc/default/plexmediaserver ]] && \
|
||||||
|
|
@ -90,9 +88,9 @@ fi
|
||||||
INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' plexmediaserver)
|
INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' plexmediaserver)
|
||||||
|
|
||||||
# start update routine
|
# 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 )
|
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=""
|
PLEX_TOKEN=""
|
||||||
REMOTE_VERSION=$(curl -s "${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 )
|
REMOTE_VERSION=$(curl -s "${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 )
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue