summaryrefslogtreecommitdiff
path: root/util/scripts/update_submodules
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2022-10-21 13:42:10 +0200
committerMartin L Roth <gaumless@gmail.com>2022-10-23 02:39:27 +0000
commit1e336dd91e749a66efbb841be368c944dfd6a4f2 (patch)
treebb91775ac54519418729c7e9201d8006692179c7 /util/scripts/update_submodules
parent08e7df9d5d93225d263b29c38ba7d4d9945f6dfc (diff)
scripts/update_submodules: Fix "bad revision" error
Fix "bad revision" error when we run "update_submodules" with no option. This adds "origin/trunk" branch name for "util/goswid". Change-Id: Ie84d40fa00c6d0032b93917ad96e60120388eab5 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68650 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'util/scripts/update_submodules')
-rwxr-xr-xutil/scripts/update_submodules4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/scripts/update_submodules b/util/scripts/update_submodules
index 6b8eb09960..4ca2925ff7 100755
--- a/util/scripts/update_submodules
+++ b/util/scripts/update_submodules
@@ -110,8 +110,10 @@ main() {
if git branch -a | grep -q "origin/main"; then
branch_name="origin/main"
- else
+ elif git branch -a | grep -q "origin/master"; then
branch_name="origin/master"
+ elif git branch -a | grep -q "origin/trunk"; then
+ branch_name="origin/trunk"
fi
updated_commit_id="$(git log --pretty='%h' -n 1 "${branch_name}" -- )"