代码拉取完成,页面将自动刷新
同步操作将从 乐鑫开源/esp-gitee-tools 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env bash
set -e
set -u
die() {
echo "${1:-"Unknown Error"}" 1>&2
exit 1
}
IDF_PATH=${1:-"${PWD}"}
IDF_PATH=$(cd ${IDF_PATH} && pwd -P)
export IDF_PATH
[ -f "${IDF_PATH}/tools/tools.json" ] || die "${IDF_PATH}/tools/tools.json does not exist!"
cp ${IDF_PATH}/tools/tools.json ${IDF_PATH}/tools/tools_gitee.json
if [[ "$OSTYPE" == "darwin"* ]]; then
extension="\"\""
else
extension=
fi
sed -i ${extension} 's,"url": "https://github.com/,"url": "https://dl.espressif.com/github_assets/,g' ${IDF_PATH}/tools/tools_gitee.json
if [ -f "${IDF_PATH}/tools/detect_python.sh" ]; then
echo "Detecting Python interpreter"
. "${IDF_PATH}/tools/detect_python.sh"
echo "Installing ESP-IDF tools"
"${ESP_PYTHON}" "${IDF_PATH}/tools/idf_tools.py" --tools-json ${IDF_PATH}/tools/tools_gitee.json install
echo "Installing Python environment and packages"
"${ESP_PYTHON}" "${IDF_PATH}/tools/idf_tools.py" install-python-env
else
echo "Installing ESP-IDF tools"
${IDF_PATH}/tools/idf_tools.py --tools-json ${IDF_PATH}/tools/tools_gitee.json install
echo "Installing Python environment and packages"
${IDF_PATH}/tools/idf_tools.py install-python-env
fi
rm ${IDF_PATH}/tools/tools_gitee.json
echo "All done! You can now run:"
echo ""
echo " . ${IDF_PATH}/export.sh"
echo ""
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。