2018-02-24 04:15:23 -04:00
|
|
|
#!/bin/bash
|
|
|
|
echo "Checking homebrew..."
|
|
|
|
$(which -s brew)
|
|
|
|
if [[ $? != 0 ]] ; then
|
|
|
|
echo "installing homebrew..."
|
|
|
|
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
|
|
|
else
|
|
|
|
echo "Homebrew installed"
|
|
|
|
fi
|
|
|
|
|
|
|
|
#install xconde dependencies
|
|
|
|
xcode-select --install
|
|
|
|
|
2018-07-07 08:20:41 -03:00
|
|
|
brew tap ardupilot/homebrew-px4
|
2018-02-24 04:15:23 -04:00
|
|
|
brew update
|
|
|
|
brew install genromfs
|
|
|
|
brew install gcc-arm-none-eabi
|
|
|
|
brew install gawk
|
|
|
|
|
|
|
|
echo "Checking pip..."
|
|
|
|
$(which -s pip)
|
|
|
|
if [[ $? != 0 ]] ; then
|
|
|
|
echo "installing pip..."
|
|
|
|
sudo easy_install pip
|
|
|
|
else
|
|
|
|
echo "pip installed"
|
|
|
|
fi
|
|
|
|
|
2018-08-11 11:36:55 -03:00
|
|
|
sudo pip2 install pyserial future empy mavproxy
|
2018-02-24 04:15:23 -04:00
|
|
|
|
|
|
|
SCRIPT_DIR=$(dirname $(realpath ${BASH_SOURCE[0]}))
|
|
|
|
ARDUPILOT_ROOT=$(realpath "$SCRIPT_DIR/../../")
|
|
|
|
ARDUPILOT_TOOLS="Tools/autotest"
|
|
|
|
|
|
|
|
exportline="export PATH=$ARDUPILOT_ROOT/$ARDUPILOT_TOOLS:\$PATH";
|
|
|
|
grep -Fxq "$exportline" ~/.profile 2>/dev/null || {
|
2019-01-25 07:00:34 -04:00
|
|
|
read -p "Add $ARDUPILOT_ROOT/$ARDUPILOT_TOOLS to your PATH [N/y]?" -n 1 -r
|
2018-02-24 04:15:23 -04:00
|
|
|
if [[ $REPLY =~ ^[Yy]$ ]] ; then
|
|
|
|
echo $exportline >> ~/.profile
|
|
|
|
eval $exportline
|
|
|
|
else
|
|
|
|
echo "Skipping adding $ARDUPILOT_ROOT/$ARDUPILOT_TOOLS to PATH."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
git submodule update --init --recursive
|
|
|
|
|
|
|
|
echo "finished"
|