git.sh multi-tree: grab submodules *after* patches

right now, if we want to patch a project such that certain
submodules are no tdownloaded, or diffreent submodules are
downloaded, or current ones are downloaded from other
locations, we cannot do this, because we apply submodule
updates *before* applying patches.

therefore, we should change it so that they are applied
*after* installing patches.

Signed-off-by: Leah Rowe <leah@libreboot.org>
9020vga
Leah Rowe 2023-12-30 20:30:49 +00:00
parent 5fb6e36f03
commit f3098f566c
1 changed files with 2 additions and 2 deletions

View File

@ -63,11 +63,11 @@ prepare_new_tree()
cp -R "src/${project}/${project}" "${tmp_git_dir}" || \
err "prepare_new_tree ${project}/${tree}: can't make tmpclone"
git_reset_rev "${tmp_git_dir}" "${rev}"
git_am_patches "${tmp_git_dir}" "$PWD/$cfgsdir/$tree/patches" || \
err "prepare_new_tree ${project}/${tree}: patch fail"
[ ! -f "${tmp_git_dir}/.gitmodules" ] || \
git -C "${tmp_git_dir}" submodule update --init --checkout \
|| err "prepare_new_tree ${project}/${tree}: !submodules"
git_am_patches "${tmp_git_dir}" "$PWD/$cfgsdir/$tree/patches" || \
err "prepare_new_tree ${project}/${tree}: patch fail"
[ "${patchfail}" = "y" ] && err "PATCH FAIL"
mv "${tmp_git_dir}" "src/${project}/${tree}" || \