From 2c127c8d9954fc9297f6b4d2be51280fd140bf57 Mon Sep 17 00:00:00 2001 From: Kron4ek Date: Fri, 22 Oct 2021 14:56:43 +0500 Subject: [PATCH] Add check for debootstrap and perl --- create_ubuntu_chroots.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/create_ubuntu_chroots.sh b/create_ubuntu_chroots.sh index a3bcb78..188dbc1 100755 --- a/create_ubuntu_chroots.sh +++ b/create_ubuntu_chroots.sh @@ -13,6 +13,11 @@ if [ "$EUID" != 0 ]; then exit 1 fi +if ! command -v debootstrap 1>/dev/null || ! command -v perl 1>/dev/null; then + echo "Please install debootstrap and perl and run the script again" + exit 1 +fi + # Keep in mind that although you can choose any version of Ubuntu/Debian # here, but this script has only been tested with Ubuntu 18.04 Bionic export CHROOT_DISTRO="bionic"