Commit Graph

21 Commits

Author SHA1 Message Date
Justin Ong
8097cc9d72 Fix references to IDF_ADD_PATHS_EXTRAS before being declared 2023-04-28 21:30:53 +08:00
Roland Dobai
7473fd3f0f Tools: don't add the esptool directory with wrappers to the PATH
Esptool.py is available from the esptool package which is installed in
every ESP-IDF v5.0+ shells. Therefore, the path to the legacy wrapper
scripts is not needed to be in the PATH. In some cases like
https://github.com/espressif/esp-idf/issues/10926 it even cases problem
because the wrapper doesn't have a shebang line and is not executable.

Note that the wrapper is kept only for invoking esptool as "python
$IDF_PATH/..../esptool.py" which was previously used mostly in CMake
files. There should be no other use-case where the esptool wrappers are
still needed.
2023-03-22 11:18:24 +01:00
Max Larsson
a6573d8adb Make export.fish exit with SUCCESS exit code
The export.fish script exits with an exit code of 4. Thus, any shell checks that make sure the source command exits successfully always failed. This was due to the last line trying to erase the __main function. In fish, you can't erase a function using the `set` command, you can only erase variables. By removing that line the script now exits with an exit code of 0 instead of 4.

Erase __main function at the end of export.fish

Closes https://github.com/espressif/esp-idf/pull/10828
2023-03-10 11:29:04 +01:00
Marek Fiala
c63ec6cf08 Tools: Support ESP-IDF installed in system-wide shared directory for all users
Closes: https://github.com/espressif/esp-idf/issues/9329
Closes: https://github.com/espressif/esp-idf/pull/9328
2022-09-16 09:15:19 +02:00
Morgan Harris
20487e7a06 Tools: Fix export.sh failure if python is unavailable
In the latest release of macOS (and probable some other recent *nixes as well?) `python` is no longer available by default, only `python3`. This causes `export.sh` to fail as it still had a reference to plain `python`. This now works as expected.

Merges https://github.com/espressif/esp-idf/pull/9749
2022-09-14 13:53:32 +02:00
Marek Fiala
5974f495b6 Fix macOS compatibility
command "readlink -m" was not compatible with macOS.
2022-08-31 14:38:24 +02:00
imcaizheng
84ec01c330 export.fish: set IDF_PATH without changing current working directory 2022-08-31 02:07:31 +08:00
Marek Fiala
d558b511da Tools: Auto-detect IDF_PATH in export.fish, fix setting environmental variables
Edited GitHub user's change to keep the echo message consistent with other export scripts
Fixed working with environmental variables in fish.

pull request sha: 5a646b8067
2022-06-23 14:42:35 +02:00
Alexander Grin
5a646b8067 Add default IDF_PATH detection to export.fish
Closes https://github.com/espressif/esp-idf/pull/6814
2022-06-22 16:43:09 +02:00
Marek Fiala
029de43db3 tools: bugfix export.sh change IDF_PATH only if file is esp-idf
Set the self_path where the export.sh script is located, not the sourcing directory.
2022-03-15 11:24:09 +01:00
Marek Fiala
df16a45d7a tools: Switching between ESP-IDF versions
Support switching between ESP-IDF versions on UNIX systems.
2022-03-11 12:57:25 +01:00
Marek Fiala
a4b0560014 tools: Remove tools that are not used by active ESP-IDF version.
Or remove unused archives from tools - older version, or unused tool archive
2022-02-20 19:48:50 +01:00
Roland Dobai
a93e372364 Tools: Fix silent failure about the incompatible Python 2022-02-16 18:44:13 +01:00
Roland Dobai
b28d7e6850 Tools: Improve the Python package system
Introduce features into the Python package management system & manage
package versions outside of ESP-IDF repo.
2022-01-17 16:54:36 +01:00
Marek Fiala
8dd6d9fa5f Edited Rob Walker's commit to keep ESP_IDF consistency 2021-10-13 21:28:35 +08:00
Martin Gaňo
fb70ea6d13 Fixed test autocompletion 2021-05-26 10:58:05 +02:00
Roland Dobai
47f67f8b81 tools: Prefer python3 during install and export
Install and export script should work on systems without "python"
executable.

Closes https://github.com/espressif/esp-idf/pull/6471

Closes https://github.com/espressif/esp-idf/issues/6532

Related to https://github.com/espressif/esp-idf/issues/6421 and
https://github.com/espressif/arduino-esp32/issues/4717
2021-02-13 11:34:40 +01:00
martin.gano
346b002d9a enable autocompletion for command idf.py 2020-11-03 23:27:58 +01:00
Kelvie Wong
9a79de3659 export.fish: Remove source check
This prevents starting a new shell with the IDF environment like this:

    env IDF_PATH=/my/idf/path fish -C 'source "$IDF_PATH"/export.fish'

as `status current-command` returns `fish` in this case, but this check expects
`source`.

This check does nothing anyway, as you can't even execute that file even if it
was marked executable, as fish rejects files without a shebang, and it's not
valid bash.

Closes https://github.com/espressif/esp-idf/pull/5860
2020-09-16 10:20:17 +02:00
Ivan Grokhotkov
a1f5866424 tools: export.{sh,fish}: add otatool.py to PATH 2020-04-03 01:15:29 +02:00
Elia Bieri
0c1577fdcd Add export and install scripts for fish shell
Closes https://github.com/espressif/esp-idf/issues/4459
Merges https://github.com/espressif/esp-idf/pull/4944
2020-03-27 17:46:37 +08:00