From 96eb62b46712e104bda383bf8e0526572514f8d7 Mon Sep 17 00:00:00 2001 From: Henric Andersson Date: Tue, 14 Feb 2017 13:12:26 -0800 Subject: [PATCH] Warn users who forget to set PUBLIC=no Even if you define email and password, the public version is still downloaded unless PUBLIC=no This change warns the user about this behavior since it's most likely not intended. --- plexupdate.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plexupdate.sh b/plexupdate.sh index 45b2193..cd3fd4e 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -378,6 +378,8 @@ if [ -z "${EMAIL}" -o -z "${PASS}" ] && [ "${PUBLIC}" = "no" ]; then elif [ ! -z "${EMAIL}" ] && [[ "$EMAIL" == *"@"* ]] && [[ "$EMAIL" != *"@"*"."* ]]; then error "EMAIL field must contain a valid email address" exit 1 +elif [ ! -z "${EMAIL}" -a ! -z "${PASS}" -a "${PUBLIC}" = "yes" ]; then + warn "You have defined email and password but PUBLIC is set to yes, this will not download the PlexPass version" fi