git.sh: move repo copying to a new function
Signed-off-by: Leah Rowe <leah@libreboot.org>20240612_branch
parent
093c4a367d
commit
da42727209
|
@ -100,10 +100,7 @@ git_prep()
|
||||||
[ "$xbmk_release" = "y" ] && [ "$_loc" != "src/$project/$project" ] \
|
[ "$xbmk_release" = "y" ] && [ "$_loc" != "src/$project/$project" ] \
|
||||||
&& rmgit "$tmpgit"
|
&& rmgit "$tmpgit"
|
||||||
|
|
||||||
[ "$_loc" = "${_loc%/*}" ] || x_ mkdir -p "${_loc%/*}"
|
move_repo "$_loc"
|
||||||
mv "$tmpgit" "$_loc" || $err "git_prep: !mv $tmpgit $_loc"
|
|
||||||
[ -n "$xtree" ] && [ ! -d "src/coreboot/$xtree" ] && \
|
|
||||||
x_ ./update trees -f coreboot "$xtree"; return 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prep_submodules()
|
prep_submodules()
|
||||||
|
@ -142,3 +139,11 @@ link_crossgcc()
|
||||||
ln -s "../../$xtree/util/crossgcc" crossgcc || $err "$1: !xgcc link"
|
ln -s "../../$xtree/util/crossgcc" crossgcc || $err "$1: !xgcc link"
|
||||||
) || $err "$1: !xgcc link"
|
) || $err "$1: !xgcc link"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
move_repo()
|
||||||
|
{
|
||||||
|
[ "$1" = "${1%/*}" ] || x_ mkdir -p "${1%/*}"
|
||||||
|
mv "$tmpgit" "$1" || $err "git_prep: !mv $tmpgit $1"
|
||||||
|
[ -n "$xtree" ] && [ ! -d "src/coreboot/$xtree" ] && \
|
||||||
|
x_ ./update trees -f coreboot "$xtree"; return 0
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue