bin/_docker.sh: Fix shellcheck issues (#4433)

Signed-off-by: Joakim Roubert <joakimr@axis.com>
This commit is contained in:
Joakim Roubert 2020-05-19 19:39:41 +02:00 committed by GitHub
parent 113ccbc9c6
commit 406107bc87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -80,7 +80,6 @@ jobs:
run: | run: |
find ./bin -type f \ find ./bin -type f \
! -name docker-build-proxy \ ! -name docker-build-proxy \
! -name _docker.sh \
! -name fmt \ ! -name fmt \
! -name lint \ ! -name lint \
! -name _log.sh \ ! -name _log.sh \

View File

@ -1,3 +1,5 @@
#!/bin/bash
set -eu set -eu
bindir=$( cd "${BASH_SOURCE[0]%/*}" && pwd ) bindir=$( cd "${BASH_SOURCE[0]%/*}" && pwd )
@ -33,8 +35,6 @@ docker_build() {
file=$1 file=$1
shift shift
extra="$@"
output=/dev/null output=/dev/null
if [ -n "$DOCKER_TRACE" ]; then if [ -n "$DOCKER_TRACE" ]; then
output=/dev/stderr output=/dev/stderr
@ -42,11 +42,11 @@ docker_build() {
rootdir=$( cd "$bindir"/.. && pwd ) rootdir=$( cd "$bindir"/.. && pwd )
log_debug " :; docker build $rootdir -t $repo:$tag -f $file $extra" log_debug " :; docker build $rootdir -t $repo:$tag -f $file $*"
docker build "$rootdir" \ docker build "$rootdir" \
-t "$repo:$tag" \ -t "$repo:$tag" \
-f "$file" \ -f "$file" \
$extra \ "$@" \
> "$output" > "$output"
echo "$repo:$tag" echo "$repo:$tag"