[EDGEPOD-186]

Fix the SKIP_DIRS functionality in the ansiblelint.sh script, which was
skipping additional items incorrectly.

Change-Id: I8ed270f01a7c49d584195da1b66a9567650faae7
diff --git a/jjb/shell/ansiblelint.sh b/jjb/shell/ansiblelint.sh
index ebb5328..f9eca6f 100755
--- a/jjb/shell/ansiblelint.sh
+++ b/jjb/shell/ansiblelint.sh
@@ -16,7 +16,7 @@
 
 # ansiblelint.sh - check all yaml files that they pass the ansible-lint tool
 
-set +e -u -o pipefail
+set +e -o pipefail
 
 fail_ansible=0
 
@@ -30,16 +30,16 @@
 
 # allow directories to be skipped
 # space separated directory list expected in SKIP_DIRS
-
-SKIP_DIRS=""
 SKIP_REGEX=""
 
-if [[ -n $SKIP_DIRS ]]; then
+if [ -n "$SKIP_DIRS" ]; then
   echo "=> Skipping files matching these directories: $SKIP_DIRS"
   # prefix with ./ as find generates, swap spaces for pipes
-  SKIP_REGEX=$(echo $SKIP_DIRS | sed 's/[^ ]*/.\/&\//g' | sed 's/ /|/g')
+  SKIP_REGEX=$(echo "$SKIP_DIRS" | sed 's/[^ ]*/.\/&\//g' | sed 's/ /|/g')
 fi
 
+set -u
+
 while IFS= read -r -d '' yf
 do
   if [[ $yf =~ $SKIP_REGEX ]]; then