trees: simplified distclean directory check

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit6
Leah Rowe 2024-06-30 17:13:49 +01:00
parent 5ba0433b5f
commit 0cb84a8dd1
1 changed files with 3 additions and 7 deletions

View File

@ -127,14 +127,10 @@ handle_src_tree()
chkvars tree
cdir="src/$project/$tree"
if [ ! -d "$cdir" ]; then
if [ "$mode" = "distclean" ] || \
[ "$mode" = "crossgcc-clean" ]; then
printf "Dir '%s' missing; skip clean\n" "$cdir" 1>&2
return 1
fi
x_ ./update trees -f "$project" "$target"
if [ "$mode" = "distclean" ] || [ "$mode" = "crossgcc-clean" ]; then
[ -d "$cdir" ] || return 1
fi
x_ ./update trees -f "$project" "$target"
[ "$target1" = "utils" ] && [ "$project" = "coreboot" ] && return 0
[ -z "$mode" ] && check_cross_compiler; return 0