diff options
author | guillaume.lambert <guillaume.lambert@orange.com> | 2022-05-10 22:04:23 +0200 |
---|---|---|
committer | Guillaume Lambert <guillaume.lambert@orange.com> | 2023-03-21 09:13:19 +0000 |
commit | b9fedb6868306a6e3145b7ee851ea3a84353df9c (patch) | |
tree | 0deebe33f61c377970a0c38b7679537523bca172 /build.sh | |
parent | 7677c43363c22c7bfca60855058af503860c63b8 (diff) |
Stop bashing functest scripts
Though bash is a good interactive user shell
and apart portability concerns,
many UN*X systems and GNU+Linux distributions now prefers Almquist
or Kornshell variants for scripting in order to improve the system
performance and maintenability.
https://wiki.ubuntu.com/DashAsBinSh
https://mywiki.wooledge.org/Bashism
https://en.wikipedia.org/wiki/Almquist_shell
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I32c5490f9eab54e6cac594f3eac1e392edf8b272
Diffstat (limited to 'build.sh')
-rw-r--r-- | build.sh | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e @@ -13,7 +13,7 @@ docker/smoke-cntt \ docker/benchmarking-cntt"} arm_dirs=${arm_dirs-${amd64_dirs}} 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|${repo}/functest-core:amd64-latest|g" {} + @@ -24,7 +24,7 @@ find . -name Dockerfile -exec sed -i \ ${repo}/functest-benchmarking:amd64-latest|g" {} + for dir in ${amd64_dirs}; do (cd "${dir}" && - docker build "${build_opts[@]}" \ + docker build $build_opts \ -t "${repo}/functest-${dir##**/}:amd64-latest" .) docker push "${repo}/functest-${dir##**/}:amd64-latest" [ "${dir}" != "docker/core" ] && @@ -44,7 +44,7 @@ find . -name Dockerfile -exec sed -i \ -e "s|opnfv/functest-benchmarking|\ ${repo}/functest-benchmarking:arm64-latest|g" {} + for dir in ${arm64_dirs}; do - (cd "${dir}" && docker build "${build_opts[@]}" \ + (cd "${dir}" && docker build $build_opts \ -t "${repo}/functest-${dir##**/}:arm64-latest" .) docker push "${repo}/functest-${dir##**/}:arm64-latest" [ "${dir}" != "docker/core" ] && @@ -65,7 +65,7 @@ find . -name Dockerfile -exec sed -i \ -e "s|opnfv/functest-benchmarking|\ ${repo}/functest-benchmarking:arm-latest|g" {} + for dir in ${arm_dirs}; do - (cd "${dir}" && docker build "${build_opts[@]}" \ + (cd "${dir}" && docker build $build_opts \ -t "${repo}/functest-${dir##**/}:arm-latest" .) docker push "${repo}/functest-${dir##**/}:arm-latest" [ "${dir}" != "docker/core" ] && |