# Install apt dependencies in the chroot
cd /tmp
-schroot -c $chrootdir /bin/bash << EOF
+schroot -c $chrootdir /bin/bash --directory=/tmp << EOF
echo Installing necessary apt dependencies in the chroot
apt-get update -y
apt-get upgrade -y
apt-get install -y automake binutils-dev build-essential \
-ccache cmake gcc git \
-libtool \
-sysvinit-core \
-sysvinit-utils \
-sudo \
-python2.7 \
-python3 python3-pip \
-python3-setuptools python3-dev
+ ccache cmake gcc git \
+ libtool \
+ sysvinit-core \
+ sysvinit-utils \
+ sudo \
+ python2.7 \
+ python3 python3-pip \
+ python3-setuptools python3-dev
# yeah systemd in a chroot? not very funny joke.
apt-get remove -y systemd