Apex: Fixes unset var checks 31/65231/1
authorTim Rozet <trozet@redhat.com>
Tue, 20 Nov 2018 03:58:02 +0000 (22:58 -0500)
committerTim Rozet <trozet@redhat.com>
Tue, 20 Nov 2018 03:58:02 +0000 (22:58 -0500)
Var checks for unset required proper parameter expansion to avoid
nounset.

Change-Id: Ide5db47e2243c8aee0f97369bf3cd0673e7f4bd3
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/apex/apex-deploy.sh

index 0e247df..09d6ca6 100755 (executable)
@@ -13,7 +13,7 @@ echo "Starting the Apex deployment."
 echo "--------------------------------------------------------"
 echo
 
-if [ -z "$DEPLOY_SCENARIO" ]; then
+if [ -z ${DEPLOY_SCENARIO+x} ]; then
   echo "Deploy scenario not set!"
   exit 1
 else
@@ -151,7 +151,7 @@ if [[ "$JOB_NAME" =~ "virtual" ]]; then
     else
       ENV_TYPE="functest"
     fi
-    if [ -z "$OS_VERSION" ]; then
+    if [ -z ${OS_VERSION+x} ]; then
       echo "INFO: OS_VERSION not passed to deploy, detecting based on branch and scenario"
       case $BRANCH in
         master)