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
|
trap cleanup EXIT
|
||||||
|
|
||||||
declare oci_cmd
|
declare OCI_CMD
|
||||||
|
|
||||||
if whereis podman >/dev/null; then
|
if [ "x${OCI_CMD:-}" = "x" ]; then
|
||||||
oci_cmd=podman
|
if whereis docker >/dev/null; then
|
||||||
elif whereis docker >/dev/null; then
|
OCI_CMD=docker
|
||||||
oci_cmd=docker
|
elif whereis podman >/dev/null; then
|
||||||
else
|
OCI_CMD=podman
|
||||||
|
else
|
||||||
echo "No container engine (docker/podman) found!"
|
echo "No container engine (docker/podman) found!"
|
||||||
exit 2
|
exit 2
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$oci_cmd" build -t isle "$SRCDIR/docker"
|
"$OCI_CMD" build -t isle "$SRCDIR/docker"
|
||||||
|
|
||||||
mkdir -p result
|
mkdir -p result
|
||||||
rm -rf result/*
|
rm -rf result/*
|
||||||
@ -42,7 +44,7 @@ if [[ "x${JOBS:-}" == "x" ]]; then
|
|||||||
JOBS=$(nproc)
|
JOBS=$(nproc)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$oci_cmd" run -it \
|
"$OCI_CMD" run -it \
|
||||||
-e CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo" \
|
-e CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo" \
|
||||||
-v "$SRCDIR":/isle:rw \
|
-v "$SRCDIR":/isle:rw \
|
||||||
-e JOBS="$JOBS" \
|
-e JOBS="$JOBS" \
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user