#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"
apt update
for item in $list; do
    apt list --installed $item 2>/dev/null || sudo apt-get install -y $item
done
