Skip to content

Commit

Permalink
docs, scripts: Correct the priority of the PATH setting
Browse files Browse the repository at this point in the history
  • Loading branch information
antmak committed Sep 27, 2018
1 parent 1b3385e commit 7c8d5d2
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion add_path.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else
IDF_ADD_PATHS_EXTRAS="${IDF_ADD_PATHS_EXTRAS}:${IDF_PATH}/components/espcoredump"
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="${PATH}:${IDF_ADD_PATHS_EXTRAS}"
export PATH="${IDF_ADD_PATHS_EXTRAS}:${PATH}"
echo "Added to PATH: ${IDF_ADD_PATHS_EXTRAS}"
fi

Expand Down
4 changes: 2 additions & 2 deletions docs/en/get-started-cmake/add-idf_path-to-profile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Linux and MacOS
Set up ``IDF_PATH`` and add ``idf.py`` to the PATH by adding the following two lines to your ``~/.profile`` file::

export IDF_PATH=~/esp/esp-idf
export PATH="$PATH:$IDF_PATH/tools"
export PATH="$IDF_PATH/tools:$PATH"

.. note::

Expand All @@ -68,6 +68,6 @@ A path like ``${IDF_PATH}/tools/idf.py`` should be printed.
If you do not like to have ``IDF_PATH`` or ``PATH`` modifications set, you can enter it manually in terminal window on each restart or logout::

export IDF_PATH=~/esp/esp-idf
export PATH="$PATH:$IDF_PATH/tools"
export PATH="$IDF_PATH/tools:$PATH"

If you got here from section :ref:`get-started-setup-path-cmake`, while installing s/w for ESP32 development, then go back to section :ref:`get-started-start-project-cmake`.
4 changes: 2 additions & 2 deletions docs/en/get-started-cmake/linux-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ ESP32 toolchain for Linux is available for download from Espressif website:

To use it, you will need to update your ``PATH`` environment variable in ``~/.profile`` file. To make ``xtensa-esp32-elf`` available for all terminal sessions, add the following line to your ``~/.profile`` file::

export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin"
export PATH="$HOME/esp/xtensa-esp32-elf/bin:$PATH"

Alternatively, you may create an alias for the above command. This way you can get the toolchain only when you need it. To do this, add different line to your ``~/.profile`` file::

alias get_esp32='export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin"'
alias get_esp32='export PATH="$HOME/esp/xtensa-esp32-elf/bin:$PATH"'

Then when you need the toolchain you can type ``get_esp32`` on the command line and the toolchain will be added to your ``PATH``.

Expand Down
4 changes: 2 additions & 2 deletions docs/en/get-started-cmake/macos-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ The toolchain will be extracted into ``~/esp/xtensa-esp32-elf/`` directory.

To use it, you will need to update your ``PATH`` environment variable in ``~/.profile`` file. To make ``xtensa-esp32-elf`` available for all terminal sessions, add the following line to your ``~/.profile`` file::

export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin
export PATH=$HOME/esp/xtensa-esp32-elf/bin:$PATH

Alternatively, you may create an alias for the above command. This way you can get the toolchain only when you need it. To do this, add different line to your ``~/.profile`` file::

alias get_esp32="export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin"
alias get_esp32="export PATH=$HOME/esp/xtensa-esp32-elf/bin:$PATH"

Then when you need the toolchain you can type ``get_esp32`` on the command line and the toolchain will be added to your ``PATH``.

Expand Down
4 changes: 2 additions & 2 deletions docs/en/get-started/linux-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ ESP32 toolchain for Linux is available for download from Espressif website:

To use it, you will need to update your ``PATH`` environment variable in ``~/.profile`` file. To make ``xtensa-esp32-elf`` available for all terminal sessions, add the following line to your ``~/.profile`` file::

export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin"
export PATH="$HOME/esp/xtensa-esp32-elf/bin:$PATH"

Alternatively, you may create an alias for the above command. This way you can get the toolchain only when you need it. To do this, add different line to your ``~/.profile`` file::

alias get_esp32='export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin"'
alias get_esp32='export PATH="$HOME/esp/xtensa-esp32-elf/bin:$PATH"'

Then when you need the toolchain you can type ``get_esp32`` on the command line and the toolchain will be added to your ``PATH``.

Expand Down
4 changes: 2 additions & 2 deletions docs/en/get-started/macos-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ The toolchain will be extracted into ``~/esp/xtensa-esp32-elf/`` directory.

To use it, you will need to update your ``PATH`` environment variable in ``~/.profile`` file. To make ``xtensa-esp32-elf`` available for all terminal sessions, add the following line to your ``~/.profile`` file::

export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin
export PATH=$HOME/esp/xtensa-esp32-elf/bin:$PATH

Alternatively, you may create an alias for the above command. This way you can get the toolchain only when you need it. To do this, add different line to your ``~/.profile`` file::

alias get_esp32="export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin"
alias get_esp32="export PATH=$HOME/esp/xtensa-esp32-elf/bin:$PATH"

Then when you need the toolchain you can type ``get_esp32`` on the command line and the toolchain will be added to your ``PATH``.

Expand Down
4 changes: 2 additions & 2 deletions docs/zh_CN/get-started/linux-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ Linux 版的 ESP32 工具链可以从 Espressif 的网站下载:

要使用工具链,你还需要在 ``~/.profile`` 文件中更新环境变量 ``PATH``。要使 ``xtensa-esp32-elf`` 在所有的终端会话中都有效,需要将下面这一行代码添加到你的 ``~/.profile`` 文件中: ::

export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin"
export PATH="$HOME/esp/xtensa-esp32-elf/bin:$PATH"

或者你也可以给上面的命令创建一个别名。这样做的好处是,你只在需要使用它的时候才获取工具链。将下面这行代码添加到 ``~/.profile`` 文件中即可: ::

alias get_esp32='export PATH="$PATH:$HOME/esp/xtensa-esp32-elf/bin"'
alias get_esp32='export PATH="$HOME/esp/xtensa-esp32-elf/bin:$PATH"'

然后,当你需要使用工具链时,在命令行输入 ``get_esp32``,然后工具链会自动添加到你的 ``PATH`` 中。

Expand Down
4 changes: 2 additions & 2 deletions docs/zh_CN/get-started/macos-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ Mac OS 版本的 ESP32 工具链可以从以下地址下载:

在 ``~/.profile`` 文件中更新 ``PATH`` 环境变量以使用工具链。为了使 ``xtensa-esp32-elf`` 在各种终端会话中都可用,在 ``~/.profile`` 文件中加上以下指令::

export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin
export PATH=$HOME/esp/xtensa-esp32-elf/bin:$PATH

或者,您可以为上述命令创建一个别名。这样只有执行以下指令时工具链才能被使用。将下面的指令添加到您的 ``〜/ .profile`` 文件中::

alias get_esp32="export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin"
alias get_esp32="export PATH=$HOME/esp/xtensa-esp32-elf/bin:$PATH"

当需要使用工具链时,在命令行里输入 ``get_esp32``,就可以将工具链添加到 ``PATH`` 中。

Expand Down
2 changes: 1 addition & 1 deletion tools/windows/windows_install_prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ rm ~/${TOOLCHAIN_ZIP}
cat > /etc/profile.d/esp32_toolchain.sh << EOF
# This file was created by ESP-IDF windows_install_prerequisites.sh
# and will be overwritten if that script is run again.
export PATH="\$PATH:/opt/xtensa-esp32-elf/bin"
export PATH="\/opt/xtensa-esp32-elf/bin:$PATH"
EOF

# clean up pacman package cache to save some disk space
Expand Down

0 comments on commit 7c8d5d2

Please sign in to comment.