mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
Tools: install-prereqs-ubuntu: fix return code checking
We are running the script with -e so we can't check the return code like that.
This commit is contained in:
parent
4c6dac2d5d
commit
757f48ff83
@ -77,24 +77,24 @@ if [ ! -d $OPT/$ARM_ROOT ]; then
|
||||
fi
|
||||
|
||||
exportline="export PATH=$OPT/$ARM_ROOT/bin:\$PATH";
|
||||
if ! grep -Fxq "$exportline" ~/.profile ; then
|
||||
grep -Fxq "$exportline" ~/.profile 2>/dev/null || {
|
||||
if maybe_prompt_user "Add $OPT/$ARM_ROOT/bin to your PATH [Y/n]?" ; then
|
||||
echo $exportline >> ~/.profile
|
||||
$exportline
|
||||
else
|
||||
echo "Skipping adding $OPT/$ARM_ROOT/bin to PATH."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
exportline2="export PATH=$CWD/$ARDUPILOT_TOOLS:\$PATH";
|
||||
if ! grep -Fxq "$exportline2" ~/.profile ; then
|
||||
grep -Fxq "$exportline2" ~/.profile 2>/dev/null || {
|
||||
if maybe_prompt_user "Add $CWD/$ARDUPILOT_TOOLS to your PATH [Y/n]?" ; then
|
||||
echo $exportline2 >> ~/.profile
|
||||
$exportline2
|
||||
else
|
||||
echo "Skipping adding $CWD/$ARDUPILOT_TOOLS to PATH."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
apt-cache search arm-none-eabi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user