#! /bin/bash set -ex # bootstrap _this_ repo (toes-image-builder), not the image itself. # should only have to do this once per host we run this on. packages=( kpartx parted fdisk dosfstools e2fsprogs xz-utils rsync curl ca-certificates ) case "$(uname -m)" in aarch64|arm64) echo "native arm64 host detected; skipping qemu user emulation packages" ;; *) packages=(qemu-user-static binfmt-support "${packages[@]}") ;; esac sudo apt-get update sudo apt-get install -y "${packages[@]}"