Simplified tests aren't compatible with bash -u.

This commit is contained in:
cimryan
2018-10-23 07:27:58 -07:00
parent 9898fe95ee
commit b6abdfb726

View File

@@ -2,15 +2,9 @@
USER_ENABLED_PUSHOVER=false USER_ENABLED_PUSHOVER=false
if [[ -z $REPO ]] REPO=${REPO:-cimryan}
then
REPO=cimryan
fi
f [[ -z $BRANCH ]] BRANCH=${BRANCH:-master}
then
BRANCH=master
fi
if ! [ $(id -u) = 0 ] if ! [ $(id -u) = 0 ]
then then
@@ -28,9 +22,9 @@ function check_variable () {
} }
function check_pushover_enabled () { function check_pushover_enabled () {
if [ "$pushover_enabled" = "true" ] if [ ! -z "${pushover_enabled+x}" ]
then then
if [[ -z $pushover_user_key ]] || [[ -z $pushover_app_key ]] if [ ! -n "${pushover_user_key+x}" ] || [ ! -n "${pushover_app_key+x}" ]
then then
echo "STOP: You're trying to setup Pushover but didn't provide your User and/or App key." echo "STOP: You're trying to setup Pushover but didn't provide your User and/or App key."
echo "Define the variables like this:" echo "Define the variables like this:"