summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-01-01 15:27:01 +0000
committerLeah Rowe <leah@libreboot.org>2024-01-01 15:27:01 +0000
commit1fcbadb8da52a0ca8924b61a83fa86cc38a1c360 (patch)
treea055b7cadccb56a01fc4b9ab5676b94017ec50e3 /include
parent48551ced3fea58322e996ca78652ceafb4b9a041 (diff)
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 <leah@libreboot.org>
Diffstat (limited to 'include')
-rwxr-xr-xinclude/git.sh7
1 files 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()