Skip to content

Instantly share code, notes, and snippets.

@carlosedp
Created May 12, 2026 17:52
Show Gist options
  • Select an option

  • Save carlosedp/73346e4650f8b4a5b4d511042c5199e1 to your computer and use it in GitHub Desktop.

Select an option

Save carlosedp/73346e4650f8b4a5b4d511042c5199e1 to your computer and use it in GitHub Desktop.
Mutable Instruments container build script
#!/usr/bin/env bash
# Build a module firmware using the Mutable Instruments toolchain container.
# Usage: ./build.sh [module] [make targets...]
# module - subdirectory containing the makefile (default: rings)
# make targets - any additional make targets, e.g. wav (default: none)
#
# Examples:
# ./build.sh
# ./build.sh rings
# ./build.sh rings wav
set -euo pipefail
MODULE="${1:-rings}"
shift || true # remaining args are extra make targets
RUNTIME=podman
CONTAINER_IMAGE="docker.io/archont94/mutable-env:latest"
exec $RUNTIME run --rm \
-v "$(pwd)":/target \
-w /target \
-e PYTHONPATH=/target \
"${CONTAINER_IMAGE}" \
bash -c "make -f ${MODULE}/makefile $*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment