Move scheme runner code here as it's the only repo that needs it

This commit is contained in:
2024-09-05 11:27:07 +03:00
parent 22e30570d0
commit 24eacb64e2
4 changed files with 90 additions and 38 deletions
Executable
+30
View File
@@ -0,0 +1,30 @@
#!/bin/bash
set -e
DOCKERFILE=Dockerfile
if test "${1}" = "" -o "${2}" = "";
then
echo "Example: "
echo "scheme_runner debian guile \"make test\""
exit
else
implementation="${1}"
cmd="${2}"
tag="scheme-runner-${implementation}"
if [ "${WINE}" = "true" ];
then
tag=${tag}-wine
fi
echo "Running command: ${cmd}, with implementation: ${implementation}"
docker build \
--build-arg IMPLEMENTATION=${implementation} \
--build-arg PACKAGES="${PACKAGES}" \
--build-arg WINE="${WINE}" \
-f ${DOCKERFILE} \
--tag ${tag}:latest \
--quiet \
.
docker run -it -v ${PWD}:/workdir:z ${tag}:latest ${cmd}
fi