mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
tools: {export,install}.sh: fix quoting issues
This commit is contained in:
parent
79f2e68bc0
commit
a038fb24bd
@ -111,16 +111,19 @@ __main() {
|
||||
then
|
||||
path_prefix=${PATH%%${old_path}}
|
||||
# shellcheck disable=SC2169,SC2039 # unreachable with 'dash'
|
||||
paths="${path_prefix//:/ }"
|
||||
if [ -n "${paths}" ]; then
|
||||
if [ -n "${path_prefix}" ]; then
|
||||
__verbose "Added the following directories to PATH:"
|
||||
else
|
||||
__verbose "All paths are already set."
|
||||
fi
|
||||
for path_entry in ${paths}
|
||||
old_ifs="$IFS"
|
||||
IFS=":"
|
||||
for path_entry in ${path_prefix}
|
||||
do
|
||||
__verbose " ${path_entry}"
|
||||
done
|
||||
IFS="$old_ifs"
|
||||
unset old_ifs
|
||||
else
|
||||
__verbose "Updated PATH variable:"
|
||||
__verbose " ${PATH}"
|
||||
|
11
install.sh
11
install.sh
@ -3,10 +3,12 @@
|
||||
set -e
|
||||
set -u
|
||||
|
||||
export IDF_PATH=$(cd $(dirname $0); pwd)
|
||||
basedir=$(dirname "$0")
|
||||
IDF_PATH=$(cd "${basedir}"; pwd)
|
||||
export IDF_PATH
|
||||
|
||||
echo "Detecting the Python interpreter"
|
||||
. ${IDF_PATH}/tools/detect_python.sh
|
||||
. "${IDF_PATH}/tools/detect_python.sh"
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
TARGETS="all"
|
||||
@ -14,12 +16,11 @@ else
|
||||
TARGETS=$1
|
||||
fi
|
||||
echo "Installing ESP-IDF tools"
|
||||
${ESP_PYTHON} ${IDF_PATH}/tools/idf_tools.py install --targets=${TARGETS}
|
||||
"${ESP_PYTHON}" "${IDF_PATH}/tools/idf_tools.py" install --targets=${TARGETS}
|
||||
|
||||
echo "Installing Python environment and packages"
|
||||
${ESP_PYTHON} ${IDF_PATH}/tools/idf_tools.py install-python-env
|
||||
"${ESP_PYTHON}" "${IDF_PATH}/tools/idf_tools.py" install-python-env
|
||||
|
||||
basedir="$(dirname $0)"
|
||||
echo "All done! You can now run:"
|
||||
echo ""
|
||||
echo " . ${basedir}/export.sh"
|
||||
|
Loading…
Reference in New Issue
Block a user