Install Scripts Update
This commit is contained in:
@@ -14,6 +14,16 @@ set -e
|
|||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
|
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||||
|
|
||||||
|
# Source ArduPilot environment
|
||||||
|
if [ -f "$HOME/.ardupilot_env" ]; then
|
||||||
|
source "$HOME/.ardupilot_env"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Activate ArduPilot venv (has empy and other dependencies)
|
||||||
|
if [ -f "$HOME/venv-ardupilot/bin/activate" ]; then
|
||||||
|
source "$HOME/venv-ardupilot/bin/activate"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "=============================================="
|
echo "=============================================="
|
||||||
echo " ArduPilot Controller"
|
echo " ArduPilot Controller"
|
||||||
echo "=============================================="
|
echo "=============================================="
|
||||||
|
|||||||
@@ -67,6 +67,14 @@ cd "$ARDUPILOT_HOME"
|
|||||||
Tools/environment_install/install-prereqs-ubuntu.sh -y
|
Tools/environment_install/install-prereqs-ubuntu.sh -y
|
||||||
. ~/.profile || true
|
. ~/.profile || true
|
||||||
|
|
||||||
|
# Source ArduPilot environment (includes venv with empy)
|
||||||
|
if [ -f "$HOME/.ardupilot_env" ]; then
|
||||||
|
source "$HOME/.ardupilot_env"
|
||||||
|
fi
|
||||||
|
if [ -f "$HOME/venv-ardupilot/bin/activate" ]; then
|
||||||
|
source "$HOME/venv-ardupilot/bin/activate"
|
||||||
|
fi
|
||||||
|
|
||||||
# Build ArduCopter SITL (without DDS to avoid complexity)
|
# Build ArduCopter SITL (without DDS to avoid complexity)
|
||||||
./waf configure --board sitl
|
./waf configure --board sitl
|
||||||
./waf copter
|
./waf copter
|
||||||
@@ -120,6 +128,10 @@ if ! grep -q "$BASHRC_MARKER" ~/.bashrc; then
|
|||||||
cat >> ~/.bashrc << EOF
|
cat >> ~/.bashrc << EOF
|
||||||
|
|
||||||
$BASHRC_MARKER
|
$BASHRC_MARKER
|
||||||
|
# Source ArduPilot environment (venv + tools)
|
||||||
|
if [ -f ~/.ardupilot_env ]; then
|
||||||
|
source ~/.ardupilot_env
|
||||||
|
fi
|
||||||
export ARDUPILOT_HOME=$ARDUPILOT_HOME
|
export ARDUPILOT_HOME=$ARDUPILOT_HOME
|
||||||
export PATH=\$PATH:$ARDUPILOT_HOME/Tools/autotest
|
export PATH=\$PATH:$ARDUPILOT_HOME/Tools/autotest
|
||||||
export PATH=\$PATH:\$HOME/.local/bin
|
export PATH=\$PATH:\$HOME/.local/bin
|
||||||
|
|||||||
Reference in New Issue
Block a user