We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efe9785 commit a5b437cCopy full SHA for a5b437c
1 file changed
dist/tools/esptools/export.sh
@@ -38,11 +38,20 @@ export_arch()
38
TOOLS_DIR="${TOOLS_PATH}/${TARGET_ARCH}/${ESP32_GCC_RELEASE}/${TARGET_ARCH}"
39
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
40
41
- if [ -e "${TOOLS_DIR}" ] && [ -z "${TOOLS_DIR_IN_PATH}" ]; then
+ if [ ! -e "${TOOLS_DIR}" ]; then
42
+ echo "${TOOLS_DIR} does not exist - please run"
43
+ echo $(echo $0 | sed 's/export/install/') $1
44
+ exit 1
45
+ fi
46
+
47
+ if [ -z "${TOOLS_DIR_IN_PATH}" ]; then
48
echo "Extending PATH by ${TOOLS_DIR}/bin"
49
export PATH="${TOOLS_DIR}/bin:${PATH}"
50
fi
51
52
+ echo "To make this permanent, add this line to your ~/.bashrc or ~/.profile:"
53
+ echo PATH="\$PATH:${TOOLS_DIR}/bin"
54
55
unset TOOLS_DIR
56
}
57
0 commit comments