]> granicus.if.org Git - esp-idf/commitdiff
docs, scripts: Correct the priority of the PATH setting
authorAnton Maklakov <anton@espressif.com>
Thu, 27 Sep 2018 06:55:37 +0000 (14:55 +0800)
committerAnton Maklakov <anton@espressif.com>
Thu, 27 Sep 2018 06:55:37 +0000 (14:55 +0800)
add_path.sh
docs/en/get-started-cmake/add-idf_path-to-profile.rst
docs/en/get-started-cmake/linux-setup.rst
docs/en/get-started-cmake/macos-setup.rst
docs/en/get-started/linux-setup.rst
docs/en/get-started/macos-setup.rst
docs/zh_CN/get-started/linux-setup.rst
docs/zh_CN/get-started/macos-setup.rst
tools/windows/windows_install_prerequisites.sh

index 1d35c732aa3953bf392e6b0c4c25860dae160fcb..71257aa77af8129cb16d9408739c132b3773d813 100644 (file)
@@ -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
 
index a3b3a471ef7e84af4f5803d78c0903343b301a68..a6268de0f71a8280dd7eeb6264dcbbc356b325ed 100644 (file)
@@ -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::
 
@@ -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`.
index 07394ca55dee638c77a91846a5a7f955841242a9..cdac99ce7bbe6fa98905efceee066997307bd28f 100644 (file)
@@ -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``.
 
index 6a4241f4f3c8a8548a8f5a81d9e52ccc839dba65..7672444e8a488ef30e0b80b9b3745d449f4a4515 100644 (file)
@@ -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``.
 
index 00d024ac5ce44993a48b915c8a312b29d5b94daa..9d5681b4d9dd8fef0dea8fd9518dbac1df653f04 100644 (file)
@@ -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``.
 
index 2708dc6e661933d713e4acb4337ec39d85cb55cd..7e1921a6c396292d6d5b56ddc7b2dc043a549966 100644 (file)
@@ -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``.
 
index d1d658924ece0315b00f28f8aff135e06ba94072..3457fd7a4ac5455557aedbe29536ff8f71281005 100644 (file)
@@ -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`` 中。
 
index 781a6d7465a42996d6904a07d60bdf07ced40093..72596ead23590c6270a2217dbc62c9b227754edf 100644 (file)
@@ -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`` 中。
 
index a08137197f3d880c454ad4e9beb11e35c5e10350..f13a5d714d0bc90f92f8b7eac1946c8497414966 100644 (file)
@@ -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