mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
Tools: install-preresq-ubuntu: add check for DO_AP_STM_ENV before adding to path
This prevent to have /opt//bin on PATH if we don't want STM toolchain
This commit is contained in:
parent
5468869eba
commit
712d812f4e
@ -256,6 +256,8 @@ heading "Adding ArduPilot Tools to environment"
|
||||
|
||||
SCRIPT_DIR=$(dirname $(realpath ${BASH_SOURCE[0]}))
|
||||
ARDUPILOT_ROOT=$(realpath "$SCRIPT_DIR/../../")
|
||||
|
||||
if [[ $DO_AP_STM_ENV -eq 1 ]]; then
|
||||
exportline="export PATH=$OPT/$ARM_ROOT/bin:\$PATH";
|
||||
grep -Fxq "$exportline" ~/$SHELL_LOGIN 2>/dev/null || {
|
||||
if maybe_prompt_user "Add $OPT/$ARM_ROOT/bin to your PATH [N/y]?" ; then
|
||||
@ -265,6 +267,7 @@ grep -Fxq "$exportline" ~/$SHELL_LOGIN 2>/dev/null || {
|
||||
echo "Skipping adding $OPT/$ARM_ROOT/bin to PATH."
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
exportline2="export PATH=$ARDUPILOT_ROOT/$ARDUPILOT_TOOLS:\$PATH";
|
||||
grep -Fxq "$exportline2" ~/$SHELL_LOGIN 2>/dev/null || {
|
||||
|
Loading…
Reference in New Issue
Block a user