Skip to content

Commit 346d0ef

Browse files
committed
use ",," instead of export and case switch
1 parent dc8483e commit 346d0ef

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ Valid settings for VERSION are:-
100100

101101
## Versions
102102

103+
+ **03.01.17:** Use case insensitive version variable matching rather than export and make lowercase.
103104
+ **17.10.16:** Allow use of uppercase version variable
104105
+ **01.10.16:** Add TZ info to README.
105106
+ **09.09.16:** Add layer badges to README.

root/etc/cont-init.d/50-plex-update

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#!/usr/bin/with-contenv bash
2-
# Check variable status
3-
export VERSION=$(echo "$VERSION" | tr '[:upper:]' '[:lower:]')
42

53
# copy config on first run, regardless of update status
64
[[ ! -e /etc/default/plexmediaserver ]] && \
@@ -90,9 +88,9 @@ fi
9088
INSTALLED_VERSION=$(dpkg-query -W -f='${Version}' plexmediaserver)
9189

9290
# start update routine
93-
if [[ "$VERSION" = latest ]] || [[ "$VERSION" = plexpass ]] || [[ "$PLEXPASS" == "1" ]]; then
91+
if [[ "${VERSION,,}" = latest ]] || [[ "${VERSION,,}" = plexpass ]] || [[ "$PLEXPASS" == "1" ]]; then
9492
REMOTE_VERSION=$(curl -s "${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 )
95-
elif [[ "$VERSION" = public ]]; then
93+
elif [[ "${VERSION,,}" = public ]]; then
9694
PLEX_TOKEN=""
9795
REMOTE_VERSION=$(curl -s "${PLEX_INSTALL}&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 )
9896
else

0 commit comments

Comments
 (0)