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>9020vga
parent
48551ced3f
commit
1fcbadb8da
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue