CS3700-project2/scripts/nspawn-support.sh

11 lines
382 B
Bash
Raw Normal View History

2020-01-29 21:23:07 +00:00
#!/bin/bash
cmd="$1"
dir="$2"
if [ "$cmd" == "create" ]; then
debootstrap --include=systemd-container --include=libpython3.6 --include=racket --components=main,universe bionic "$dir" http://archive.ubuntu.com/ubuntu/
elif [ "$cmd" == "boot" ]; then
systemd-nspawn -D "$dir" --bind "$PWD:/router" -- /bin/bash -c "cd /router && scripts/run-tests.sh /router/build; bash"
fi