1#!/usr/bin/env bash 2 3set -e 4set -u 5 6basedir=$(dirname "$0") 7IDF_PATH=$(cd "${basedir}"; pwd) 8export IDF_PATH 9 10echo "Detecting the Python interpreter" 11. "${IDF_PATH}/tools/detect_python.sh" 12 13if [ "$#" -eq 0 ]; then 14 TARGETS="all" 15else 16 TARGETS=$1 17fi 18echo "Installing ESP-IDF tools" 19"${ESP_PYTHON}" "${IDF_PATH}/tools/idf_tools.py" install --targets=${TARGETS} 20 21echo "Installing Python environment and packages" 22"${ESP_PYTHON}" "${IDF_PATH}/tools/idf_tools.py" install-python-env 23 24echo "All done! You can now run:" 25echo "" 26echo " . ${basedir}/export.sh" 27echo "" 28