Fix ShellCheck warnings 59/68059/2
authorCédric Ollivier <cedric.ollivier@orange.com>
Sat, 15 Jun 2019 10:05:43 +0000 (12:05 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sat, 15 Jun 2019 11:01:12 +0000 (13:01 +0200)
Change-Id: Idf571b39d38b9184b2e08c183d4afe44784fbfe6
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit db7c7d3031c8f9a562c6e3db0922e1cfb92ea92b)

build.sh

index d7d7262..ce6f9de 100644 (file)
--- a/build.sh
+++ b/build.sh
@@ -19,7 +19,7 @@ docker/smoke \
 docker/benchmarking \
 docker/features"}
 arm64_dirs=${arm64_dirs-${amd64_dirs}}
-build_opts=(--pull=true --no-cache --force-rm=true)
+build_opts=("--pull=true" --no-cache "--force-rm=true")
 
 find . -name Dockerfile -exec sed -i \
     -e "s|opnfv/functest-core:hunter|${repo}/functest-core:amd64-hunter|g" {} +
@@ -35,7 +35,7 @@ for dir in ${amd64_dirs}; do
     [ "${dir}" != "docker/core" ] &&
         (docker rmi "${repo}/functest-${dir##**/}:amd64-hunter" || true)
 done
-[ ! -z "${amd64_dirs}" ] &&
+[ -n "${amd64_dirs}" ] &&
     (docker rmi "${repo}/functest-core:amd64-hunter" alpine:3.9 || true)
 find . -name Dockerfile -exec git checkout {} +
 
@@ -54,7 +54,7 @@ for dir in ${arm64_dirs}; do
     [ "${dir}" != "docker/core" ] &&
         (docker rmi "${repo}/functest-${dir##**/}:arm64-hunter" || true)
 done
-[ ! -z "${arm64_dirs}" ] &&
+[ -n "${arm64_dirs}" ] &&
     (docker rmi "${repo}/functest-core:arm64-hunter" \
         multiarch/alpine:arm64-v3.9 || true)
 find . -name Dockerfile -exec git checkout {} +
@@ -74,7 +74,7 @@ for dir in ${arm_dirs}; do
     [ "${dir}" != "docker/core" ] &&
         (docker rmi "${repo}/functest-${dir##**/}:arm-hunter" || true)
 done
-[ ! -z "${arm_dirs}" ] &&
+[ -n "${arm_dirs}" ] &&
     (docker rmi "${repo}/functest-core:arm-hunter" \
         multiarch/alpine:armhf-v3.9 || true)
 find . -name Dockerfile -exec git checkout {} +