Software /
code /
prosody
Changeset
13403:0369f6986824
tools: Fix selection of container engine
Seems command -v in sh only checks and returns one argument, unlike
bash.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 12 Dec 2023 16:19:04 +0100 |
parents | 13402:6877786d73d7 |
children | 13404:034c7af177f0 |
files | tools/build-env/build.sh |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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}" \