#!/bin/bash cmd="$1" dir="$2" if [ "$cmd" == "create" ]; then debootstrap --include=systemd-container --include=racket --components=main,universe disco "$dir" http://archive.ubuntu.com/ubuntu/ systemd-nspawn -D "$dir" --bind "$PWD:/router" -- /bin/bash -c "cd /router && scripts/setup.sh" elif [ "$cmd" == "boot" ]; then systemd-nspawn -D "$dir" --bind "$PWD:/router" -- /bin/bash -c "cd /router && scripts/run-tests.sh /router/build" elif [ "$cmd" == "test" ]; then systemd-nspawn -D "$dir" --bind "$PWD:/router" -- /bin/bash -c "cd /router && bash" fi