summaryrefslogtreecommitdiff
path: root/include/git.sh
diff options
context:
space:
mode:
Diffstat (limited to 'include/git.sh')
-rwxr-xr-xinclude/git.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/include/git.sh b/include/git.sh
index cd4d788f..3b3aeb32 100755
--- a/include/git.sh
+++ b/include/git.sh
@@ -94,15 +94,8 @@ git_prep()
prep_submodules "$_loc"
fi
- if [ "$project" = "coreboot" ] && [ -n "$xtree" ] && \
- [ "$xtree" != "$tree" ] && [ $# -gt 2 ]; then
- (
- cd "$tmpgit/util" || $err "prep $1: !cd $tmpgit/util"
- rm -Rf crossgcc || $err "prep $1: !rm xgcc"
- ln -s "../../$xtree/util/crossgcc" crossgcc || \
- $err "prep $1: can't create xgcc symlink"
- ) || $err "prep $1: can't create xgcc symlink"
- fi
+ [ "$project" = "coreboot" ] && [ -n "$xtree" ] && [ $# -gt 2 ] && \
+ [ "$xtree" != "$tree" ] && link_crossgcc "$_loc"
[ "$xbmk_release" = "y" ] && [ "$_loc" != "src/$project/$project" ] \
&& rmgit "$tmpgit"
@@ -129,6 +122,15 @@ prep_submodules()
done < "$tmpdir/modules"
}
+link_crossgcc()
+{
+ (
+ cd "$tmpgit/util" || $err "prep $1: !cd $tmpgit/util"
+ rm -Rf crossgcc || $err "prep $1: !rm xgcc"
+ ln -s "../../$xtree/util/crossgcc" crossgcc || $err "$1: !xgcc link"
+ ) || $err "$1: !xgcc link"
+}
+
git_am_patches()
{
for _patch in "$2/"*; do