Skip to content

Commit

Permalink
Merge branch 'bugfix/writable_idf_tools_path' into 'master'
Browse files Browse the repository at this point in the history
Tools: Support ESP-IDF installed in system-wide shared directory for all users

Closes IDFGH-7790 and IDFGH-7791

See merge request espressif/esp-idf!19479
  • Loading branch information
dobairoland committed Sep 19, 2022
2 parents 728654a + c63ec6c commit c658d09
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 152 deletions.
8 changes: 4 additions & 4 deletions export.fish
@@ -1,6 +1,6 @@
# This script should be sourced, not executed.

# `idf_tools.py export --unset` create statement, with keyword unset, but fish shell support only `set --erase variable`
# `idf_tools.py export --deactivate` create statement, with keyword unset, but fish shell support only `set --erase variable`
function unset
set --erase $argv
end
Expand Down Expand Up @@ -28,8 +28,8 @@ function __main
"$ESP_PYTHON" "$IDF_PATH"/tools/python_version_checker.py

echo "Checking other ESP-IDF version."
set idf_unset ("$ESP_PYTHON" "$IDF_PATH"/tools/idf_tools.py export --unset) || return 1
eval "$idf_unset"
set idf_deactivate ("$ESP_PYTHON" "$IDF_PATH"/tools/idf_tools.py export --deactivate) || return 1
eval "$idf_deactivate"

echo "Adding ESP-IDF tools to PATH..."
# Call idf_tools.py to export tool paths
Expand Down Expand Up @@ -85,7 +85,7 @@ function __main
set -e ESP_PYTHON
set -e uninstall
set -e script_dir
set -e idf_unset
set -e idf_deactivate


# Not unsetting IDF_PYTHON_ENV_PATH, it can be used by IDF build system
Expand Down
6 changes: 3 additions & 3 deletions export.sh
Expand Up @@ -116,8 +116,8 @@ __main() {
"$ESP_PYTHON" "${IDF_PATH}/tools/python_version_checker.py"

__verbose "Checking other ESP-IDF version."
idf_unset=$("$ESP_PYTHON" "${IDF_PATH}/tools/idf_tools.py" export --unset) || return 1
eval "${idf_unset}"
idf_deactivate=$("$ESP_PYTHON" "${IDF_PATH}/tools/idf_tools.py" export --deactivate) || return 1
eval "${idf_deactivate}"

__verbose "Adding ESP-IDF tools to PATH..."
# Call idf_tools.py to export tool paths
Expand Down Expand Up @@ -183,7 +183,7 @@ __cleanup() {
unset path_entry
unset IDF_ADD_PATHS_EXTRAS
unset idf_exports
unset idf_unset
unset idf_deactivate
unset ESP_PYTHON
unset SOURCE_ZSH
unset SOURCE_BASH
Expand Down

0 comments on commit c658d09

Please sign in to comment.