Skip to content
Snippets Groups Projects
Unverified Commit 29b3c766 authored by Johannes Schauer Marin Rodrigues's avatar Johannes Schauer Marin Rodrigues
Browse files

check whether all required packages are installed

parent eca38a6c
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,22 @@ set -x
set -e
# make sure build tools are installed
# FIXME: replace this by a check that everything is installed
#sudo apt-get -y install parted multistrap udisks2 gcc-aarch64-linux-gnu make device-tree-compiler qemu-user-static binfmt-support build-essential bison flex libssl-dev mmdebstrap
DEPS="mmdebstrap genext2fs e2fsprogs binfmt-support git mount arch-test qemu-user-static parted"
if [ "$(dpkg-query --showformat '${db:Status-Status}\n' --show $DEPS | sort -u)" != "installed" ]; then
echo "Not all dependencies of this script are installed."
echo "Run the following command to install them:"
echo
echo " sudo apt install $DEPS"
exit 1
fi
if dpkg --compare-versions "$(dpkg-query --showformat='${Version}\n' --show mmdebstrap)" lt "0.8.4-1"; then
echo "mmdebstrap version must be >= 0.8.4-1"
exit 1
fi
if dpkg --compare-versions "$(dpkg-query --showformat='${Version}\n' --show genext2fs)" lt "1.5.0-2"; then
echo "genext2fs version must be >= 1.5.0-2"
exit 1
fi
# if we are in a git repository and if SOURCE_DATE_EPOCH is not set, use the
# timestamp of the latest git commit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment