Commit Graph

23 Commits

Author SHA1 Message Date
Martin Gaňo
ee881e3f96 Avoid exception messages while autocomplete initialization in export.sh 2021-11-30 12:42:53 +01:00
Ivan Grokhotkov
2c375458ab export.sh: fix undefined reference to realpath after renaming 2021-10-14 09:45:30 +02:00
Ivan Grokhotkov
a038fb24bd tools: {export,install}.sh: fix quoting issues 2021-10-14 09:45:30 +02:00
Marek Fiala
d8a8eceef4 Edited Jen Chitty's commit to keep ESP_IDF consistency 2021-10-13 21:28:35 +08:00
Jen Chitty
6c564bd690 Correct export.sh failure exit code and cleanup
In failure cases, when idf_export_main() returns 1 (failure),
the export.sh script returns 0 (success). This makes it very
difficult to detect failure when writing scripts that use
export.sh. Furthermore, idf_export_main() does not clean up all
internal variables and functions in failure cases.

Move all cleanup steps into a cleanup function and pass
the return value from idf_export_main() to the cleanup
function so it can return with that same return value.

Signed-off-by: Marek Fiala <marek.fiala@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/5744
2021-10-13 21:28:35 +08:00
Marek Fiala
8dd6d9fa5f Edited Rob Walker's commit to keep ESP_IDF consistency 2021-10-13 21:28:35 +08:00
Rob Walker
25619bef04 tools/echo and cleanup fix in export scripts
Signed-off-by: Marek Fiala <marek.fiala@espressif.com>

Closes https://github.com/espressif/esp-idf/pull/5816
2021-10-13 21:28:35 +08:00
Martin Gaňo
38c148b904 Temporarily set LANG to en code to avoid RuntimeError
Closes https://github.com/espressif/esp-idf/issues/7173
2021-06-22 13:05:44 +02:00
Martin Gaňo
330d1cf2ae Fix autocomplete for bash 2021-06-11 01:59:36 +02:00
Martin Gaňo
fb70ea6d13 Fixed test autocompletion 2021-05-26 10:58:05 +02:00
Martin Gaňo
16731833fb add default value for unset env variables
Closes IDFGH-4784
2021-03-08 09:18:34 +01:00
Markus Reiter
d20a5c39da Fix error when ZSH_VERSION is unset.
Merges https://github.com/espressif/esp-idf/pull/6587
2021-03-08 09:18:34 +01: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
304cff9f75 Redirect warning to stderr and unset temporary shell procedure 2020-11-11 15:12:58 +01:00
Angus Gratton
66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
martin.gano
346b002d9a enable autocompletion for command idf.py 2020-11-03 23:27:58 +01:00
Ivan Grokhotkov
4712392161 tools: export.sh: fix compatibility with dash shell
* fix constructs invalid in dash
* clean shellcheck warnings and disable false positive ones

Closes https://github.com/espressif/esp-idf/issues/5366
2020-06-08 19:33:00 +02:00
Ivan Grokhotkov
46e9aef6c9 tools/check_python_dependencies: print diagnostic info on failure
Helps collect more data for cases such as:
https://github.com/espressif/esp-idf/issues/5133
2020-04-16 11:58:16 +02:00
Ivan Grokhotkov
a1f5866424 tools: export.{sh,fish}: add otatool.py to PATH 2020-04-03 01:15:29 +02:00
Ivan Grokhotkov
1c4c584e28 tools: export.sh: better detection and checking of IDF_PATH
1. detect IDF_PATH in zsh, if it is not set
2. if IDF_PATH is set, check that it is valid
3. make sure IDF_PATH is exported, not just set

Related to https://github.com/espressif/esp-idf/issues/3793
Closes https://github.com/espressif/esp-idf/pull/4418
Closes https://github.com/espressif/esp-idf/issues/4770
2020-04-03 01:15:29 +02:00
Ivan Grokhotkov
3f9fc97de7 tools: export.sh: fix ESP-IDF path detection on macos
The argument passed to the function is in $1; $0 contains `-bash`.
Before this fix, IDF_PATH would be set to $PWD instead of the correct
path.
2019-07-28 10:04:36 +02:00
Martin Vychodil
54b16b7f5a tools: added realpath_int() for MacOS script path resolution
JIRA IDF-790
2019-07-18 13:36:11 +02:00
Ivan Grokhotkov
12b6da0388 tools: {install,export}.{bat,sh} tools 2019-07-01 14:51:44 +02:00