Skip to content

Commit c2ade7c

Browse files
authored
Merge pull request #148 from baba-dev/codex/fix-comments-in-install_idf.sh
fix: sync ESP-IDF submodules in install script
2 parents b6c1420 + b28a910 commit c2ade7c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tools/install_idf.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@ fi
2626

2727
if [ ! -d "${IDF_PATH}/.git" ]; then
2828
echo "Cloning ESP-IDF ${ESP_IDF_VERSION} into ${IDF_PATH}"
29-
git clone --depth 1 --branch "${ESP_IDF_VERSION}" "${REPO_URL}" "${IDF_PATH}"
29+
git clone --depth 1 --branch "${ESP_IDF_VERSION}" --recurse-submodules "${REPO_URL}" "${IDF_PATH}"
3030
else
3131
echo "Updating existing ESP-IDF checkout at ${IDF_PATH}"
3232
git -C "${IDF_PATH}" fetch --depth 1 origin "${ESP_IDF_VERSION}"
3333
git -C "${IDF_PATH}" reset --hard FETCH_HEAD
3434
fi
3535

36+
git -C "${IDF_PATH}" submodule update --init --recursive --depth 1
37+
3638
if [ ! -x "${IDF_PATH}/install.sh" ]; then
3739
echo "Error: install.sh not found or not executable in ${IDF_PATH}." >&2
3840
exit 1

0 commit comments

Comments
 (0)