diff options
author | Kim Alvefur <zash@zash.se> | 2023-12-12 16:19:04 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-12-12 16:19:04 +0100 |
commit | d26ccd84004372051deeff7d68f2e9264f54055a (patch) | |
tree | 6af20ec1c2d09396563207988d08fd4e58ffdcb0 | |
parent | 4b0463968ae4c31c07f7daa08b9d8ded9b832c0b (diff) | |
download | prosody-d26ccd84004372051deeff7d68f2e9264f54055a.tar.gz prosody-d26ccd84004372051deeff7d68f2e9264f54055a.zip |
tools: Fix selection of container engine
Seems command -v in sh only checks and returns one argument, unlike
bash.
-rwxr-xr-x | tools/build-env/build.sh | 7 |
1 files changed, 6 insertions, 1 deletions
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}" \ |