# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1702394344 -3600
# Node ID 0369f698682442e3c1cfe2556426a9a3e00985fd
# Parent  6877786d73d7e2b7f6cd6345560d03e0b6826fdf
tools: Fix selection of container engine

Seems command -v in sh only checks and returns one argument, unlike
bash.

diff -r 6877786d73d7 -r 0369f6986824 tools/build-env/build.sh
--- a/tools/build-env/build.sh	Tue Dec 12 13:41:14 2023 +0000
+++ b/tools/build-env/build.sh	Tue Dec 12 16:19:04 2023 +0100
@@ -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}" \