jjb: xci: xci-set-scenario.sh: Fix conditional for default scenario 41/55541/1
authorMarkos Chandras <mchandras@suse.de>
Thu, 12 Apr 2018 07:35:15 +0000 (08:35 +0100)
committerMarkos Chandras <mchandras@suse.de>
Thu, 12 Apr 2018 07:35:15 +0000 (08:35 +0100)
We only set default scenario if there is not one set already so we
need to check if the array is empty.

Change-Id: Ic5019fb68349adaf52d669aed43574bc5eaeddc3
Signed-off-by: Markos Chandras <mchandras@suse.de>
jjb/xci/xci-set-scenario.sh

index 8ef5254..c28093d 100755 (executable)
@@ -114,7 +114,7 @@ function determine_generic_scenario() {
     done
     # For all other changes, we only need to set a default scenario if it's not set already
     if git diff HEAD^..HEAD --name-only | grep -q -v 'xci/installer\|xci/scenario'; then
-         [[ ${#DEPLOY_SCENARIO[@]} -gt 0 ]] && DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature'
+         [[ ${#DEPLOY_SCENARIO[@]} -eq 0 ]] && DEPLOY_SCENARIO[${#DEPLOY_SCENARIO[@]}]='os-nosdn-nofeature'
     fi
 
     # extract releng-xci sha