git.sh: move xgcc linking to a new function
Signed-off-by: Leah Rowe <leah@libreboot.org>audit2-merge1
parent
24934e6569
commit
1300f09e67
|
@ -99,15 +99,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"
|
||||
|
@ -134,6 +127,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
|
||||
|
|
Loading…
Reference in New Issue