git.sh: simplify submodule handling
do not use a subshell. use git -C instead. Signed-off-by: Leah Rowe <leah@libreboot.org>9020vga
parent
124b5bebd6
commit
7f98ab8e62
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue