From 182ee8e4163b79984b6c775688f1b27e9a62d514 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 20 Oct 2023 08:03:45 +0100 Subject: update/trees: don't run make if mode=fetch this fixes a regression caused by a previous revision Signed-off-by: Leah Rowe --- include/git.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/git.sh b/include/git.sh index 2976ff33..7f4b1f40 100755 --- a/include/git.sh +++ b/include/git.sh @@ -13,9 +13,11 @@ fetch_project_trees() [ -d "src/${project}/${project}" ] || fetch_from_upstream fetch_config [ -z "${rev}" ] && err "fetch_project_trees $target: undefined rev" - [ -d "src/${project}/${tree}" ] && \ + if [ -d "src/${project}/${tree}" ]; then printf "download/%s %s (%s): exists\n" \ - "${project}" "${tree}" "${_target}" 1>&2 && return 0 + "${project}" "${tree}" "${_target}" 1>&2 + return 0 + fi prepare_new_tree } @@ -60,9 +62,10 @@ prepare_new_tree() git_reset_rev "src/${project}/${tree}" "${rev}" ( x_ cd "src/${project}/${tree}" - [ ! -f ".gitmodules" ] || \ - git submodule update --init --checkout || \ - err "prepare_new_tree ${project}/${tree}: can't update git modules" + if [ -f ".gitmodules" ]; then + git submodule update --init --checkout || \ + err "prepare_new_tree ${project}/${tree}: !submodules" + fi ) git_am_patches "$PWD/src/$project/$tree" "$PWD/$cfgsdir/$tree/patches" } -- cgit v1.2.1