mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
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>
This commit is contained in:
+2
-5
@@ -103,17 +103,14 @@ git_prep()
|
|||||||
|
|
||||||
git -C "$tmpgit" reset --hard $rev || \
|
git -C "$tmpgit" reset --hard $rev || \
|
||||||
err "!git -C $_patchdir reset $rev"
|
err "!git -C $_patchdir reset $rev"
|
||||||
git_am_patches "$tmpgit" "$_patchdir" || \
|
git_am_patches "$tmpgit" "$_patchdir" || err "!am $_loc $_patchdir"
|
||||||
err "git_prep $project $_patchdir: patchfail"
|
|
||||||
|
|
||||||
[ "$project" != "coreboot" ] && [ "$project" != "u-boot" ] && \
|
[ "$project" != "coreboot" ] && [ "$project" != "u-boot" ] && \
|
||||||
git_submodule_update "$tmpgit"
|
git_submodule_update "$tmpgit"
|
||||||
[ $# -gt 2 ] && 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%/*}"
|
[ "$_loc" = "${_loc%/*}" ] || x_ mkdir -p "${_loc%/*}"
|
||||||
mv "$tmpgit" "$_loc" || \
|
mv "$tmpgit" "$_loc" || err "git_prep: !mv $tmpgit $_loc"
|
||||||
err "git_prep $project $_patchdir: !mv $tmpgit $_loc"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
git_submodule_update()
|
git_submodule_update()
|
||||||
|
|||||||
Reference in New Issue
Block a user