mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
check for existing tool folders, store last LINUX_BUILD
This commit is contained in:
parent
15417ba2e7
commit
5ae5b1a08d
@ -26,7 +26,11 @@ then
|
||||
return 1
|
||||
fi
|
||||
|
||||
BOARD=$1
|
||||
# unset the last board set
|
||||
unset $BOARD
|
||||
|
||||
# set the current board
|
||||
export BOARD=$1
|
||||
|
||||
# define the board type environment for Makefile
|
||||
eval export $BOARD=1
|
||||
@ -43,10 +47,13 @@ if [ $BOARD = "ESP32" ]; then
|
||||
fi
|
||||
if ! type xtensa-esp32-elf-gcc > /dev/null; then
|
||||
echo installing xtensa-esp32-elf-gcc
|
||||
curl -Ls https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz | tar xfz -
|
||||
else
|
||||
which xtensa-esp32-elf-gcc
|
||||
if [ ! -d "xtensa-esp32-elf" ]; then
|
||||
curl -Ls https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz | tar xfz -
|
||||
else
|
||||
echo "Folder found"
|
||||
fi
|
||||
fi
|
||||
which xtensa-esp32-elf-gcc
|
||||
export ESP_IDF_PATH=`pwd`/esp-idf
|
||||
export ESP_APP_TEMPLATE_PATH=`pwd`/app
|
||||
export PATH=$PATH:`pwd`/xtensa-esp32-elf/bin/
|
||||
@ -59,10 +66,14 @@ elif [ $BOARD = "ESP8266_BOARD" ]; then
|
||||
fi
|
||||
if ! type xtensa-lx106-elf-gcc > /dev/null; then
|
||||
echo installing xtensa-lx106-elf-gcc
|
||||
curl -Ls http://s3.voneicken.com/xtensa-lx106-elf-20160330.tgx | tar Jxf -
|
||||
else
|
||||
which xtensa-lx106-elf-gcc
|
||||
if [ ! -d "xtensa-lx106-elf" ]; then
|
||||
curl -Ls http://s3.voneicken.com/xtensa-lx106-elf-20160330.tgx | tar Jxf -
|
||||
else
|
||||
echo "Folder found"
|
||||
fi
|
||||
|
||||
fi
|
||||
which xtensa-lx106-elf-gcc
|
||||
export ESP8266_SDK_ROOT=`pwd`/esp_iot_sdk_v2.0.0.p1
|
||||
export PATH=$PATH:`pwd`/xtensa-lx106-elf/bin/
|
||||
return 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user