summaryrefslogtreecommitdiff
path: root/script/trees
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-30 17:13:49 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-30 17:13:49 +0100
commit0cb84a8dd12117029cd1c1511f400b6ec5abacb1 (patch)
tree56009faf0dd39ebbc33241424cff73a73dfdf11d /script/trees
parent5ba0433b5fadb36e8eadec8382d2750b4e912a2c (diff)
trees: simplified distclean directory check
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/trees')
-rwxr-xr-xscript/trees10
1 files changed, 3 insertions, 7 deletions
diff --git a/script/trees b/script/trees
index f5ed5141..b96c1ac0 100755
--- a/script/trees
+++ b/script/trees
@@ -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