From b8cb88092fb440dd942ef592d08cdc8b3e4eeade Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 18 Apr 2016 23:33:24 -0300 Subject: [PATCH] Tools: install-prereqs-ubuntu: fix exporting PATH Since we escape $PATH, we can't just try to export that way. Since PATH is unset if we do this, we end up with things like : ./Tools/scripts/install-prereqs-ubuntu.sh: line 101: apt-cache: command not found --- Tools/scripts/install-prereqs-ubuntu.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/scripts/install-prereqs-ubuntu.sh b/Tools/scripts/install-prereqs-ubuntu.sh index 1e4928b10c..ee3d3317ff 100755 --- a/Tools/scripts/install-prereqs-ubuntu.sh +++ b/Tools/scripts/install-prereqs-ubuntu.sh @@ -82,7 +82,7 @@ exportline="export PATH=$OPT/$ARM_ROOT/bin:\$PATH"; 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 + eval $exportline else echo "Skipping adding $OPT/$ARM_ROOT/bin to PATH." fi @@ -92,7 +92,7 @@ exportline2="export PATH=$ARDUPILOT_ROOT/$ARDUPILOT_TOOLS:\$PATH"; grep -Fxq "$exportline2" ~/.profile 2>/dev/null || { if maybe_prompt_user "Add $ARDUPILOT_ROOT/$ARDUPILOT_TOOLS to your PATH [Y/n]?" ; then echo $exportline2 >> ~/.profile - $exportline2 + eval $exportline2 else echo "Skipping adding $ARDUPILOT_ROOT/$ARDUPILOT_TOOLS to PATH." fi