mirror of
https://github.com/isledecomp/isle.git
synced 2026-02-28 06:57:37 +00:00
build: allow choice of container runtime
This commit is contained in:
parent
435a9cad03
commit
6a5231e962
@ -22,18 +22,20 @@ cleanup () {
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
declare oci_cmd
|
||||
declare OCI_CMD
|
||||
|
||||
if whereis podman >/dev/null; then
|
||||
oci_cmd=podman
|
||||
elif whereis docker >/dev/null; then
|
||||
oci_cmd=docker
|
||||
if [ "x${OCI_CMD:-}" = "x" ]; then
|
||||
if whereis docker >/dev/null; then
|
||||
OCI_CMD=docker
|
||||
elif whereis podman >/dev/null; then
|
||||
OCI_CMD=podman
|
||||
else
|
||||
echo "No container engine (docker/podman) found!"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
"$oci_cmd" build -t isle "$SRCDIR/docker"
|
||||
"$OCI_CMD" build -t isle "$SRCDIR/docker"
|
||||
|
||||
mkdir -p result
|
||||
rm -rf result/*
|
||||
@ -42,7 +44,7 @@ if [[ "x${JOBS:-}" == "x" ]]; then
|
||||
JOBS=$(nproc)
|
||||
fi
|
||||
|
||||
"$oci_cmd" run -it \
|
||||
"$OCI_CMD" run -it \
|
||||
-e CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo" \
|
||||
-v "$SRCDIR":/isle:rw \
|
||||
-e JOBS="$JOBS" \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user