2020-03-16 14:22:43 +01:00
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
2021-03-14 18:22:41 -07:00
|
|
|
set basedir (realpath (dirname (status -f)))
|
2020-03-16 14:22:43 +01:00
|
|
|
|
|
|
|
set -x IDF_PATH $basedir
|
|
|
|
|
2021-02-02 13:20:09 +01:00
|
|
|
echo "Detecting the Python interpreter"
|
|
|
|
source "$IDF_PATH"/tools/detect_python.fish
|
|
|
|
|
2022-02-15 18:36:46 +01:00
|
|
|
echo "Checking Python compatibility"
|
|
|
|
"$ESP_PYTHON" "$IDF_PATH"/tools/python_version_checker.py
|
|
|
|
|
2023-04-27 14:50:47 +02:00
|
|
|
for option in $argv
|
|
|
|
switch "$option"
|
|
|
|
case -h --help
|
|
|
|
"$ESP_PYTHON" "$IDF_PATH"/tools/install_util.py print_help fish
|
|
|
|
exit
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2021-09-16 16:48:03 +02:00
|
|
|
set TARGETS ("$ESP_PYTHON" "$IDF_PATH"/tools/install_util.py extract targets $argv) || exit 1
|
|
|
|
|
2020-03-16 14:22:43 +01:00
|
|
|
echo "Installing ESP-IDF tools"
|
2021-04-26 21:34:48 +02:00
|
|
|
"$ESP_PYTHON" "$IDF_PATH"/tools/idf_tools.py install --targets=$TARGETS
|
2021-07-25 16:15:42 -07:00
|
|
|
or exit 1
|
2020-03-16 14:22:43 +01:00
|
|
|
|
2021-09-16 16:48:03 +02:00
|
|
|
set FEATURES ("$ESP_PYTHON" "$IDF_PATH"/tools/install_util.py extract features $argv) || exit 1
|
|
|
|
|
2020-03-16 14:22:43 +01:00
|
|
|
echo "Installing Python environment and packages"
|
2021-09-16 16:48:03 +02:00
|
|
|
"$ESP_PYTHON" "$IDF_PATH"/tools/idf_tools.py install-python-env --features=$FEATURES
|
2020-03-16 14:22:43 +01:00
|
|
|
|
|
|
|
echo "All done! You can now run:"
|
|
|
|
echo ""
|
|
|
|
echo " . "$basedir"/export.fish"
|
2020-11-10 18:40:01 +11:00
|
|
|
echo ""
|