From 9ac790a8ce5dead92d00a48e199a0056b48b19ac Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Mon, 26 Dec 2022 20:18:43 -0600 Subject: [PATCH] Docker/run.sh: mollify shellcheck, and prevent splitting on whitespace passing args through to configure. --- Docker/run.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Docker/run.sh b/Docker/run.sh index c1d4e2489..b2ad6e8d0 100755 --- a/Docker/run.sh +++ b/Docker/run.sh @@ -1,9 +1,14 @@ -echo "Running with \"${@}\"..." +#!/bin/bash + +echo "Running with \"${*}\"..." # Assume we're in wolfssl/Docker WOLFSSL_DIR=$(builtin cd ${BASH_SOURCE%/*}/..; pwd) -docker build -t wolfssl --build-arg UID=$(id -u) --build-arg GID=$(id -g) ${WOLFSSL_DIR}/Docker && \ -docker run -it -v ${WOLFSSL_DIR}:/tmp/wolfssl -w /tmp/wolfssl wolfssl /bin/bash -c "./autogen.sh && ./configure $(echo ${@}) && make && ./testsuite/testsuite.test" && \ -docker run -it -v ${WOLFSSL_DIR}:/tmp/wolfssl -w /tmp/wolfssl wolfssl /bin/bash -echo "Exited with error code $?" +docker build -t wolfssl --build-arg UID=$(id -u) --build-arg GID=$(id -g) "${WOLFSSL_DIR}/Docker" && \ + docker run -it -v "${WOLFSSL_DIR}:/tmp/wolfssl" -w /tmp/wolfssl wolfssl /bin/bash -c "./autogen.sh && ./configure ${*@Q} && make && ./testsuite/testsuite.test" && \ + docker run -it -v "${WOLFSSL_DIR}:/tmp/wolfssl" -w /tmp/wolfssl wolfssl /bin/bash + +exitval=$? +echo "Exited with error code $exitval" +exit $exitval