From a685654b90f4d5a32740a89bdc7a363568478085 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 17 Apr 2025 16:54:59 +0100 Subject: 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 --- include/git.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'include/git.sh') 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() -- cgit v1.2.1