From 990869f7ec8dbb91f14f9edde6f02dc30fd18b8e Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Fri, 21 Jun 2024 14:32:45 +0200 Subject: [PATCH] openocd: build: prevent old clone to fail on git submodules Working on an old local git repository, the git sub-modules could have been set before last changes in .gitmodules. The script 'bootstrap' does not update the url of the repositories and this can cause the script to fail. Add 'git submodule sync' to the script to update the url of the repositories. While there, fuse 'git submodule init' and git submodule update' in a single command. Reported-by: Karl Hammar Change-Id: I61412f804dbbb7a843aa009139ddb4b8e71beefb Signed-off-by: Antonio Borneo Reviewed-on: https://review.openocd.org/c/openocd/+/8375 Tested-by: jenkins --- bootstrap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrap b/bootstrap index cf6167fff..7d4ca37bd 100755 --- a/bootstrap +++ b/bootstrap @@ -38,8 +38,8 @@ if [ -n "$SKIP_SUBMODULE" ]; then echo "Skipping submodule setup" else echo "Setting up submodules" - git submodule init - git submodule update + git submodule sync + git submodule update --init fi if [ -x src/jtag/drivers/libjaylink/autogen.sh ]; then