-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_master_idf.sh
More file actions
executable file
·26 lines (22 loc) · 935 Bytes
/
Copy pathupdate_master_idf.sh
File metadata and controls
executable file
·26 lines (22 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
# Update the "master" ESP-IDF checkout to the latest origin/master.
# Separate from test_all_idf.sh because this can be slow (fetch + submodule
# update) and you don't want it re-run on every test pass.
set -u
IDF_MASTER_REPO="$HOME/.espressif/master/esp-idf"
if [ ! -d "$IDF_MASTER_REPO/.git" ]; then
echo "ERROR: $IDF_MASTER_REPO is not a git checkout"
exit 1
fi
echo "==> Updating esp-idf master checkout at $IDF_MASTER_REPO"
cd "$IDF_MASTER_REPO" &&
git fetch origin master &&
git reset --hard origin/master &&
git submodule update --init --recursive &&
# The python venv (idf-component-manager, esptool, etc.) is pinned to
# whatever the source tree required when it was last installed. A moving
# master branch can bump those requirements, so reinstall after every
# update or idf.py fails with stale-module errors.
echo "==> Reinstalling esp-idf python environment" &&
unset IDF_PATH &&
./install.sh