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
|
fi
|
||||||
|
|
||||||
exportline="export PATH=$OPT/$ARM_ROOT/bin:\$PATH";
|
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
|
if maybe_prompt_user "Add $OPT/$ARM_ROOT/bin to your PATH [Y/n]?" ; then
|
||||||
echo $exportline >> ~/.profile
|
echo $exportline >> ~/.profile
|
||||||
$exportline
|
$exportline
|
||||||
else
|
else
|
||||||
echo "Skipping adding $OPT/$ARM_ROOT/bin to PATH."
|
echo "Skipping adding $OPT/$ARM_ROOT/bin to PATH."
|
||||||
fi
|
fi
|
||||||
fi
|
}
|
||||||
|
|
||||||
exportline2="export PATH=$CWD/$ARDUPILOT_TOOLS:\$PATH";
|
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
|
if maybe_prompt_user "Add $CWD/$ARDUPILOT_TOOLS to your PATH [Y/n]?" ; then
|
||||||
echo $exportline2 >> ~/.profile
|
echo $exportline2 >> ~/.profile
|
||||||
$exportline2
|
$exportline2
|
||||||
else
|
else
|
||||||
echo "Skipping adding $CWD/$ARDUPILOT_TOOLS to PATH."
|
echo "Skipping adding $CWD/$ARDUPILOT_TOOLS to PATH."
|
||||||
fi
|
fi
|
||||||
fi
|
}
|
||||||
|
|
||||||
apt-cache search arm-none-eabi
|
apt-cache search arm-none-eabi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user