summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/git.sh11
1 files changed, 3 insertions, 8 deletions
diff --git a/include/git.sh b/include/git.sh
index 7d06479a..e361cb41 100755
--- a/include/git.sh
+++ b/include/git.sh
@@ -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"