Skip to content

Commit a5b437c

Browse files
committed
dist/tools/esptools: make export.sh more helpful
1 parent efe9785 commit a5b437c

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

dist/tools/esptools/export.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,20 @@ export_arch()
3838
TOOLS_DIR="${TOOLS_PATH}/${TARGET_ARCH}/${ESP32_GCC_RELEASE}/${TARGET_ARCH}"
3939
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
4040

41-
if [ -e "${TOOLS_DIR}" ] && [ -z "${TOOLS_DIR_IN_PATH}" ]; then
41+
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
4248
echo "Extending PATH by ${TOOLS_DIR}/bin"
4349
export PATH="${TOOLS_DIR}/bin:${PATH}"
4450
fi
4551

52+
echo "To make this permanent, add this line to your ~/.bashrc or ~/.profile:"
53+
echo PATH="\$PATH:${TOOLS_DIR}/bin"
54+
4655
unset TOOLS_DIR
4756
}
4857

0 commit comments

Comments
 (0)