From 1fcbadb8da52a0ca8924b61a83fa86cc38a1c360 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 1 Jan 2024 15:27:01 +0000 Subject: git.sh: further simplify git_prep the directory is checked for deletion, but it's already checked before download, to see whether it already exists. lbmk already exits with zero status if the directory exists, so the check is pointless (in this function) also, general code style/formatting cleanup Signed-off-by: Leah Rowe --- include/git.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/git.sh b/include/git.sh index 7e677939..d30e90de 100755 --- a/include/git.sh +++ b/include/git.sh @@ -103,17 +103,14 @@ git_prep() git -C "$tmpgit" reset --hard $rev || \ err "!git -C $_patchdir reset $rev" - git_am_patches "$tmpgit" "$_patchdir" || \ - err "git_prep $project $_patchdir: patchfail" + git_am_patches "$tmpgit" "$_patchdir" || err "!am $_loc $_patchdir" [ "$project" != "coreboot" ] && [ "$project" != "u-boot" ] && \ git_submodule_update "$tmpgit" [ $# -gt 2 ] && git_submodule_update "$tmpgit" - rm -Rf "$_loc" || err "git_prep: !rm -Rf $_loc" [ "$_loc" = "${_loc%/*}" ] || x_ mkdir -p "${_loc%/*}" - mv "$tmpgit" "$_loc" || \ - err "git_prep $project $_patchdir: !mv $tmpgit $_loc" + mv "$tmpgit" "$_loc" || err "git_prep: !mv $tmpgit $_loc" } git_submodule_update() -- cgit v1.2.1