1 Star 0 Fork 47

suniv/esp-gitee-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.sh 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
#!/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 ""
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/suniv/esp-gitee-tools.git
git@gitee.com:suniv/esp-gitee-tools.git
suniv
esp-gitee-tools
esp-gitee-tools
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385