2018-08-21 03:11:58 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Expect to be setting up a container or chroot
|
|
|
|
if [[ $(stat -c %d:%i /) != $(stat -c %d:%i /proc/1/root/.) ]]; then
|
|
|
|
echo "Running in chroot environment. Continuing..."
|
|
|
|
elif [[ -f /.dockerenv ]]; then
|
|
|
|
echo "Running in docker environment. Continuing..."
|
|
|
|
else
|
|
|
|
echo "Script must be running in a chroot environment. Exiting..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -xe
|
|
|
|
|
2019-05-30 10:02:18 +03:00
|
|
|
apt-get install -y gcc-5 g++-5 g++-5-multilib flex libosmesa6-dev libpcap-dev \
|
2018-08-21 03:11:58 +03:00
|
|
|
libhal-dev libsane-dev libv4l-dev libgphoto2-2-dev libcapi20-dev \
|
2019-06-24 17:32:26 +03:00
|
|
|
libgsm1-dev libmpg123-dev libvulkan-dev libxslt1-dev nasm yasm ccache \
|
|
|
|
schroot
|
2018-11-07 02:32:57 +03:00
|
|
|
update-alternatives --install "$(command -v gcc)" gcc "$(command -v gcc-5)" 50
|
|
|
|
update-alternatives --set gcc "$(command -v gcc-5)"
|
|
|
|
update-alternatives --install "$(command -v g++)" g++ "$(command -v g++-5)" 50
|
|
|
|
update-alternatives --set g++ "$(command -v g++-5)"
|
|
|
|
update-alternatives --install "$(command -v cpp)" cpp-bin "$(command -v cpp-5)" 50
|
|
|
|
update-alternatives --set cpp-bin "$(command -v cpp-5)"
|