mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
git.sh: simplify submodule handling
do not use a subshell. use git -C instead. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+3
-8
@@ -65,14 +65,9 @@ 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}"
|
||||
(
|
||||
cd "${tmp_git_dir}" || \
|
||||
err "prepare_new_tree ${project}/${tree}: can't cd tmpclone"
|
||||
if [ -f ".gitmodules" ]; then
|
||||
git submodule update --init --checkout || \
|
||||
err "prepare_new_tree ${project}/${tree}: !submodules"
|
||||
fi
|
||||
) || err "git submodule update failure"
|
||||
[ ! -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"
|
||||
|
||||
Reference in New Issue
Block a user