mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
dist/tools/esptools: make export.sh more helpful
This commit is contained in:
parent
ffe844fbbc
commit
c65ed1ab55
11
dist/tools/esptools/export.sh
vendored
11
dist/tools/esptools/export.sh
vendored
@ -38,11 +38,20 @@ export_arch()
|
||||
TOOLS_DIR="${TOOLS_PATH}/${TARGET_ARCH}/${ESP32_GCC_RELEASE}/${TARGET_ARCH}"
|
||||
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
|
||||
|
||||
if [ -e "${TOOLS_DIR}" ] && [ -z "${TOOLS_DIR_IN_PATH}" ]; then
|
||||
if [ ! -e "${TOOLS_DIR}" ]; then
|
||||
echo "${TOOLS_DIR} does not exist - please run"
|
||||
echo $(echo $0 | sed 's/export/install/') $1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${TOOLS_DIR_IN_PATH}" ]; then
|
||||
echo "Extending PATH by ${TOOLS_DIR}/bin"
|
||||
export PATH="${TOOLS_DIR}/bin:${PATH}"
|
||||
fi
|
||||
|
||||
echo "To make this permanent, add this line to your ~/.bashrc or ~/.profile:"
|
||||
echo PATH="\$PATH:${TOOLS_DIR}/bin"
|
||||
|
||||
unset TOOLS_DIR
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user