forked from google/orbit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap-orbit.sh
executable file
·58 lines (50 loc) · 1.92 KB
/
bootstrap-orbit.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
#
# Copyright (c) 2020 The Orbit Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "Installing required system dependencies..."
sudo add-apt-repository universe
if [ $? -ne 0 ]; then
sudo apt-get install -y software-properties-common
sudo add-apt-repository universe
fi
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y libglu1-mesa-dev mesa-common-dev libxmu-dev libxi-dev
sudo apt-get install -y libopengl0
sudo apt-get install -y qt5-default
sudo apt-get install -y libxxf86vm-dev
sudo apt-get install -y python3-pip
echo "Checking if conan is available..."
which conan >/dev/null
if [ $? -ne 0 ]; then
echo "Couldn't find conan. Trying to install via pip..."
pip3 install --user conan || exit $?
which conan >/dev/null
if [ $? -ne 0 ]; then
echo "Could not find conan in the path, although the installation reported success."
echo "Probably conan was installed into a directory which is not in the PATH."
echo "Please ensure conan is reachable via the PATH and call this script again."
echo "Hint: Probably you have to add $HOME/.local/bin to your path variable."
echo " If you use bash, you can call 'export PATH=\$HOME/.local/bin:\$PATH'"
echo " to do that. Add this line to your .bashrc file, to make this change"
echo " persistent."
exit 1
fi
else
echo "Found conan. Skipping installation..."
fi
echo "Installing conan configuration (profiles, settings, etc.)..."
$DIR/third_party/conan/configs/install.sh || exit $?
if [ -n "$1" ] ; then
exec $DIR/build.sh "$@"
else
conan remote list | grep -v 'Disabled:' | grep -e '^artifactory:' > /dev/null 2>&1
if [ $? -eq 0 ]; then
exec $DIR/build.sh default_relwithdebinfo ggp_relwithdebinfo
else
exec $DIR/build.sh
fi
fi