forked from rock-learning/bolero
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap_bolero.sh
executable file
·75 lines (67 loc) · 2.23 KB
/
bootstrap_bolero.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#! /bin/bash
# checking minimal dependencies on Ubuntu systems...
if [ -f /etc/lsb-release ]; then
if [ -z `which sudo` ];
then
echo "sudo not available, trying to install it with 'apt-get install sudo'"
apt-get install sudo --yes
fi
if [ -z `which git` ];
then
echo "git not available, trying to install it with 'sudo apt-get install git'"
sudo apt-get install git --yes
fi
if [ -z `which unzip` ];
then
echo "unzip not available, trying to install it with 'sudo apt-get install unzip'"
sudo apt-get install unzip --yes
fi
if [ -z `which cmake` ];
then
echo "cmake not available, trying to install it with 'sudo apt-get install cmake'"
sudo apt-get install cmake --yes
fi
if [ -z `which python` ];
then
echo "python not available, trying to install it with 'sudo apt-get install python'"
sudo apt-get install python python-pip --yes
fi
YAML_AVAILABLE=1
`python -c "import yaml" 2> /dev/null` || YAML_AVAILABLE=0
if [ $YAML_AVAILABLE == 0 ];
then
echo "python-yaml not available, trying to install it with 'sudo apt-get install python-yaml'"
sudo apt-get install python-yaml --yes
fi
fi
mkdir bolero-dev
cd bolero-dev
DEV_DIR="$( cd "$( dirname "$0" )" && pwd )"
if [ -f /mingw64.exe ]; then
DEV_DIR="$(cmd //c echo $DEV_DIR)"
fi
git clone https://github.com/rock-simulation/pybob.git
cd pybob
# create default config for bolero
echo "autoprojEnv: false" > pybob.yml
echo "buildconfAddress: https://github.com/rock-learning/bolero_buildconf.git" >> pybob.yml
echo "buildconfBranch: ''" >> pybob.yml
echo "defBuildType: debug" >> pybob.yml
echo "devDir: ${DEV_DIR}" >> pybob.yml
echo "pyScriptDir: ${DEV_DIR}/pybob" >> pybob.yml
echo "rockFlavor: master" >> pybob.yml
# clone build configuration
./pybob.py buildconf
cd ..
source env.sh
# build default packages
cd pybob
./pybob.py bootstrap
echo ""
echo "To continue working with bolero in this terminal perform:"
echo ""
echo " cd bolero-dev"
echo " source env.sh"
echo ""
echo 'Whenever you open a new terminal to work with bolero switch into bolero-dev and source the "env.sh" again to activate the bolero install for that terminal.'
echo ""