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.
This commit is contained in:
Henric Andersson 2017-02-14 13:12:26 -08:00
parent 2e26cd3dcc
commit 96eb62b467

View file

@ -378,6 +378,8 @@ if [ -z "${EMAIL}" -o -z "${PASS}" ] && [ "${PUBLIC}" = "no" ]; then
elif [ ! -z "${EMAIL}" ] && [[ "$EMAIL" == *"@"* ]] && [[ "$EMAIL" != *"@"*"."* ]]; then elif [ ! -z "${EMAIL}" ] && [[ "$EMAIL" == *"@"* ]] && [[ "$EMAIL" != *"@"*"."* ]]; then
error "EMAIL field must contain a valid email address" error "EMAIL field must contain a valid email address"
exit 1 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 fi