2019-09-30 01:01:29 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-09-30 11:10:48 +02:00
|
|
|
export ARDUINO_ESP32_PATH="$ARDUINO_USR_PATH/hardware/espressif/esp32"
|
|
|
|
if [ ! -d "$ARDUINO_ESP32_PATH" ]; then
|
2019-10-02 10:58:02 +02:00
|
|
|
echo "Installing ESP32 Arduino Core ..."
|
2019-09-30 01:01:29 +02:00
|
|
|
script_init_path="$PWD"
|
2019-10-02 10:58:02 +02:00
|
|
|
mkdir -p "$ARDUINO_USR_PATH/hardware/espressif"
|
2019-09-30 01:01:29 +02:00
|
|
|
cd "$ARDUINO_USR_PATH/hardware/espressif"
|
2019-10-02 10:58:02 +02:00
|
|
|
|
|
|
|
echo "Installing Python Serial ..."
|
|
|
|
pip install pyserial > /dev/null
|
|
|
|
|
|
|
|
if [ "$OS_IS_WINDOWS" == "1" ]; then
|
|
|
|
echo "Installing Python Requests ..."
|
|
|
|
pip install requests > /dev/null
|
|
|
|
fi
|
2019-09-30 01:01:29 +02:00
|
|
|
|
|
|
|
if [ "$GITHUB_REPOSITORY" == "espressif/arduino-esp32" ]; then
|
2019-10-02 10:58:02 +02:00
|
|
|
echo "Linking Core..."
|
2019-09-30 01:01:29 +02:00
|
|
|
ln -s $GITHUB_WORKSPACE esp32
|
|
|
|
else
|
2019-10-02 10:58:02 +02:00
|
|
|
echo "Cloning Core Repository..."
|
2019-09-30 01:01:29 +02:00
|
|
|
git clone https://github.com/espressif/arduino-esp32.git esp32 > /dev/null 2>&1
|
|
|
|
fi
|
|
|
|
|
2019-10-02 10:58:02 +02:00
|
|
|
echo "Updating Submodules ..."
|
|
|
|
cd esp32
|
2019-09-30 01:01:29 +02:00
|
|
|
git submodule update --init --recursive > /dev/null 2>&1
|
|
|
|
|
2019-10-02 10:58:02 +02:00
|
|
|
echo "Installing Platform Tools ..."
|
2019-10-01 22:13:08 +02:00
|
|
|
cd tools && python get.py
|
2019-09-30 01:01:29 +02:00
|
|
|
cd $script_init_path
|
|
|
|
|
2019-09-30 11:10:48 +02:00
|
|
|
echo "ESP32 Arduino has been installed in '$ARDUINO_ESP32_PATH'"
|
2019-09-30 01:01:29 +02:00
|
|
|
echo ""
|
|
|
|
fi
|