#!/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 \ . docker run -it -v ${PWD}:/workdir:z ${tag}:latest ${cmd} fi