update/trees: simplified defconfig copying

Signed-off-by: Leah Rowe <leah@libreboot.org>
20240612_branch
Leah Rowe 2024-04-28 19:28:02 +01:00
parent 55204dc444
commit a88a8281df
1 changed files with 7 additions and 9 deletions

View File

@ -199,15 +199,13 @@ handle_makefile()
run_make_command || $err "handle_makefile $codedir: no makefile!"
if [ -e "${codedir}/.git" ] && [ "$project" = "u-boot" ] && \
[ "$mode" = "distclean" ]; then
x_ git -C "$codedir" clean -fdx
elif [ "$mode" = "oldconfig" ] || [ "$mode" = "olddefconfig" ] || \
[ "$mode" = "menuconfig" ] || [ "$mode" = "nconfig" ]; then
x_ cp "${codedir}/.config" "$config"
elif [ "$mode" = "savedefconfig" ]; then
x_ cp "${codedir}/defconfig" "$config"
fi
_copy=".config"
[ "$mode" = "savedefconfig" ] && _copy="defconfig"
[ "${mode%config}" = "$mode" ] || x_ cp "$codedir/$_copy" "$config"
[ -e "${codedir}/.git" ] && [ "$project" = "u-boot" ] && \
[ "$mode" = "distclean" ] && \
x_ git -C "$codedir" clean -fdx; return 0
}
run_make_command()