1#!/usr/bin/env fish 2 3set basedir (realpath (dirname (status -f))) 4 5set -x IDF_PATH $basedir 6 7echo "Detecting the Python interpreter" 8source "$IDF_PATH"/tools/detect_python.fish 9 10if not set -q argv[1] 11 set TARGETS "all" 12else 13 set TARGETS $argv[1] 14end 15echo "Installing ESP-IDF tools" 16"$ESP_PYTHON" "$IDF_PATH"/tools/idf_tools.py install --targets=$TARGETS 17or exit 1 18 19echo "Installing Python environment and packages" 20"$ESP_PYTHON" "$IDF_PATH"/tools/idf_tools.py install-python-env 21 22echo "All done! You can now run:" 23echo "" 24echo " . "$basedir"/export.fish" 25echo "" 26