From d26ccd84004372051deeff7d68f2e9264f54055a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 12 Dec 2023 16:19:04 +0100 Subject: tools: Fix selection of container engine Seems command -v in sh only checks and returns one argument, unlike bash. --- tools/build-env/build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/build-env/build.sh b/tools/build-env/build.sh index 5f25155a..4351f8b8 100755 --- a/tools/build-env/build.sh +++ b/tools/build-env/build.sh @@ -2,7 +2,12 @@ cd "$(dirname "$0")" -containerify="$(command -v podman docker)" +containerify="$(command -v podman || command -v docker)" + +if [ -z "$containerify" ]; then + echo "podman or docker required" >&2 + exit 1 +fi $containerify build -f ./Containerfile --squash \ --build-arg os="${2:-debian}" \ -- cgit v1.2.3