#install dependencies
if [ "$(id -u)" -ne 0 ]; then
	echo "switching from $(id -un) to root"
	exec sudo "$0" "$@"
fi
set -e
list="kpartx podman debootstrap qemu-system"
apt update
for item in $list; do
    apt install -y $item
done
cd "$(dirname "$0")"
find . -type f -name "*" -exec chmod +x {} +
