From 757f48ff833a87fabf7e4e46a774868a49e74d35 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 18 Apr 2016 23:09:31 -0300 Subject: [PATCH] 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. --- Tools/scripts/install-prereqs-ubuntu.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tools/scripts/install-prereqs-ubuntu.sh b/Tools/scripts/install-prereqs-ubuntu.sh index 93317169b8..16af4df698 100755 --- a/Tools/scripts/install-prereqs-ubuntu.sh +++ b/Tools/scripts/install-prereqs-ubuntu.sh @@ -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