-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.sh
executable file
·59 lines (53 loc) · 1.59 KB
/
setup.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
#!/bin/bash
echo "Setup OSTAR"
DOCKER_DOWNLOAD=false
DOCKER_BUILD=false
DOCKER_DISTRIBUTED=false
while [[ "$#" -gt 0 ]]; do
echo $1
case $1 in
--docker) DOCKER_DOWNLOAD=true ;;
--build) DOCKER_BUILD=true ;;
--distributed) DOCKER_DISTRIBUTED=true ;;
esac
shift
done
if $DOCKER_DOWNLOAD || $DOCKER_BUILD || $DOCKER_DISTRIBUTED; then
echo "Use runtime parameter"
if $DOCKER_DISTRIBUTED; then
answer=2
fi
if $DOCKER_BUILD; then
answer=1
fi
if $DOCKER_DOWNLOAD; then
answer=0
fi
else
echo "Choose between setups:"
echo "0: Download Single Container"
echo "1: Build Single Container"
echo "2: Build Distributed Container Simulation"
echo ""
echo "Enter 0 to 2 to continue the setup, h for more info, e for exit"
read -p "(0/1/2/h/e) " answer
fi
case $answer in
0) /bin/bash util/downloadSingleContainer.sh;
exit;;
1) /bin/bash util/setupSingleContainer.sh;
exit;;
2) /bin/bash util/setupDistributedSimulation.sh;
exit;;
h) echo "The single container simulation combines all OSTAR components, all openMSL models, a customized version of the CARLA scenario runner together with CARLA."
echo ""
echo "The distributed simulation is distributed as several containers."
echo "CARLA is not part of this setup process and needs to be provided via other ways."
echo "All OSTAR components can run on Linus and Windows."
echo "This allows for flexible setups as well as FMUs running with Windows dependencies like Matlab models."
echo "The setup uses an empty sensormodel from ASAM OSI and demostrates the possibilities."
echo ""
continue;;
e) exit;;
*) echo "invalid response";;
esac