diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-05 15:31:33 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-05 15:31:33 +0100 |
commit | 62ec3dac07584d6ab8e7f86587e730b3d159e8ef (patch) | |
tree | 9afd1cd2390e0172d908e0a01813254dbbe857bd /include/lib.sh | |
parent | 6b247c93e25f7283524edb6b6e19ca3296c78006 (diff) |
git.sh: move singletree() to lib.sh
it's also used by mk, to determine which build function
to use (build_project or build_targets).
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/lib.sh')
-rw-r--r-- | include/lib.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/lib.sh b/include/lib.sh index 43b1a318..1830356e 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -144,6 +144,15 @@ chkvars() done; : } +# return 0 if project is single-tree, otherwise 1 +# e.g. coreboot is multi-tree, so 1 +singletree() +{ + for targetfile in "config/${1}/"*/target.cfg; do + [ -e "$targetfile" ] && [ -f "$targetfile" ] && return 1; : + done; : +} + fe_() { find_ex "x_" "$@" |