From 8f26580178d2d95e7df85ee7323ad3e71f5a6f81 Mon Sep 17 00:00:00 2001 From: John Schoenick Date: Wed, 22 Aug 2018 12:45:14 -0700 Subject: [PATCH] Add steamrt-bootstrap.sh for use with steam-runtime setup scripts --- steamrt-bootstrap.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 steamrt-bootstrap.sh diff --git a/steamrt-bootstrap.sh b/steamrt-bootstrap.sh new file mode 100755 index 00000000..208cac70 --- /dev/null +++ b/steamrt-bootstrap.sh @@ -0,0 +1,23 @@ +#!/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 + +apt-get install -y gcc-5 g++-5 g++-5-multilib flex bison libosmesa6-dev libpcap-dev \ + libhal-dev libsane-dev libv4l-dev libgphoto2-2-dev libcapi20-dev \ + libgsm1-dev libmpg123-dev libvulkan-dev libxslt1-dev nasm yasm ccache +update-alternatives --install `which gcc` gcc `which gcc-5` 50 +update-alternatives --set gcc `which gcc-5` +update-alternatives --install `which g++` g++ `which g++-5` 50 +update-alternatives --set g++ `which g++-5` +update-alternatives --install `which cpp` cpp-bin `which cpp-5` 50 +update-alternatives --set cpp-bin `which cpp-5`