From 6a190188ec057e450bc4643ab31652521ef211bd Mon Sep 17 00:00:00 2001 From: Dong Heng Date: Thu, 26 Mar 2020 09:52:16 +0800 Subject: [PATCH] chore(script): add script to add path of useful SDK tools --- add_path.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 add_path.sh diff --git a/add_path.sh b/add_path.sh new file mode 100755 index 00000000..f365c3f5 --- /dev/null +++ b/add_path.sh @@ -0,0 +1,19 @@ +# This shell snippet appends useful esp-idf tools to your PATH environment +# variable. This means you can run esp-idf tools without needing to give the +# full path. +# +# Use this script like this: +# +# . ${IDF_PATH}/add_path.sh +# +if [ -z ${IDF_PATH} ]; then + echo "IDF_PATH must be set before including this script." +else + IDF_ADD_PATHS_EXTRAS="${IDF_PATH}/components/esptool_py/esptool" + IDF_ADD_PATHS_EXTRAS="${IDF_ADD_PATHS_EXTRAS}:${IDF_PATH}/components/partition_table/" + IDF_ADD_PATHS_EXTRAS="${IDF_ADD_PATHS_EXTRAS}:${IDF_PATH}/tools/" + export PATH="${IDF_ADD_PATHS_EXTRAS}:${PATH}" + echo "Added to PATH: ${IDF_ADD_PATHS_EXTRAS}" +fi + +