From a53355a61bb98bffc9e42e0d438ef8b413c23e6f Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Wed, 18 Aug 2021 23:46:03 +0200 Subject: [PATCH] Use pacman, not apt, when on Arch Linux --- mk-deb-chroot | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mk-deb-chroot b/mk-deb-chroot index 7325377..680f024 100755 --- a/mk-deb-chroot +++ b/mk-deb-chroot @@ -12,8 +12,16 @@ echo "creating chroot '$chrootdir'" # Create coriolis chroot dir in /opt mkdir -p /opt/chroot/$chrootdir -# Install debootstrap and schroot via apt -apt install -y debootstrap schroot + +# Install debootstrap and schroot +if [ -e /etc/debian_version ]; then + # Debian detected: use apt + apt install -y debootstrap schroot +elif [ -e /etc/arch-release ]; then + # Arch Linux detected: use pacman + pacman -S --needed debootstrap schroot +fi + # Install debian/buster chroot using debootstrap /usr/sbin/debootstrap buster /opt/chroot/$chrootdir \ http://ftp.uk.debian.org/debian -- 2.30.2