CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Tools/vagrant/initvagrant-trusty64.sh
Views: 1798
1
#!/usr/bin/env bash
2
3
# this script is run by the root user in the virtual machine
4
5
set -e
6
set -x
7
set -u
8
9
echo "Initial setup of SITL-vagrant instance."
10
11
/vagrant/Tools/environment_install/install-prereqs-ubuntu.sh -y
12
13
# extra packages we desire on the VM but aren't prereqs for AP compilation:
14
sudo apt-get install -y valgrind gdb
15
16
VAGRANT_USER=vagrant
17
18
PROFILE_TEXT="
19
source /vagrant/Tools/vagrant/shellinit.sh
20
# This allows the PX4NuttX build to proceed when the underlying fs is on windows
21
# It is only marginally less efficient on Linux
22
export PX4_WINTOOL=y
23
export PATH=\$PATH:\$HOME/jsbsim/build/src
24
export BUILDLOGS=/tmp/buildlogs
25
"
26
27
DOT_PROFILE=/home/$VAGRANT_USER/.profile
28
29
echo "$PROFILE_TEXT" | sudo -u $VAGRANT_USER dd conv=notrunc oflag=append of=$DOT_PROFILE
30
31
# adjust environment for every login shell:
32
BASHRC_GIT="/vagrant/Tools/vagrant/bashrc_git"
33
echo "source $BASHRC_GIT" |
34
sudo -u $VAGRANT_USER dd conv=notrunc oflag=append of=$DOT_PROFILE
35
36
sudo -u $VAGRANT_USER ln -fs /vagrant/Tools/vagrant/screenrc /home/$VAGRANT_USER/.screenrc
37
38
# build JSB sim
39
sudo -u $VAGRANT_USER /vagrant/Tools/scripts/install-jsbsim.sh /home/$VAGRANT_USER
40
41
#Plant a marker for sim_vehicle that we're inside a vagrant box
42
touch /ardupilot.vagrant
43
44
# Now you can run
45
# vagrant ssh -c "screen -d -R"
46
47