summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-04-17 16:54:59 +0100
committerLeah Rowe <leah@libreboot.org>2025-04-17 16:54:59 +0100
commita685654b90f4d5a32740a89bdc7a363568478085 (patch)
tree20132d8a40cc296edd58a1afd359db40473baeeb
parente4aa62f79a814929808a4598240dca7ce8ba876a (diff)
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>
-rw-r--r--include/git.sh9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/git.sh b/include/git.sh
index e81c7a0d..5efde03f 100644
--- a/include/git.sh
+++ b/include/git.sh
@@ -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()