git.sh: remove move_repo()

merge it with git_prep, since it's only a small
function and only called from there. the merged
code still makes sense and its purpose is still
quite clear on casual reading.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-04-17 16:54:59 +01:00
parent e4aa62f79a
commit a685654b90
+2 -7
View File
@@ -66,7 +66,8 @@ git_prep()
[ "$_loc" != "$XBMK_CACHE/repo/$project" ] && \
[ "$XBMK_RELEASE" = "y" ] && rmgit "$tmpgit"
move_repo "$_loc"
[ "$_loc" = "${_loc%/*}" ] || x_ mkdir -p "${_loc%/*}"
mv "$tmpgit" "$_loc" || $err "git_prep: !mv $tmpgit $_loc"
}
fetch_submodule()
@@ -138,12 +139,6 @@ link_crossgcc()
) || $err "$1: !xgcc link"; :
}
move_repo()
{
[ "$1" = "${1%/*}" ] || x_ mkdir -p "${1%/*}"
mv "$tmpgit" "$1" || $err "git_prep: !mv $tmpgit $1"
}
# can delete from multi- and single-tree projects.
# called from script/trees when downloading sources.
nuke()