mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 04:23:21 +00:00
trivial: check-license: exclude files from build directory earlier
This commit is contained in:
parent
996ca6a0df
commit
1be055fb1e
@ -21,17 +21,14 @@ def __get_license(fn: str) -> str:
|
|||||||
def test_files() -> int:
|
def test_files() -> int:
|
||||||
|
|
||||||
rc: int = 0
|
rc: int = 0
|
||||||
build_dir = ""
|
build_dirs = [os.path.dirname(cf) for cf in glob.glob("**/config.h")]
|
||||||
|
|
||||||
for fn in glob.glob("**/*.[c|h|py|sh]", recursive=True):
|
for fn in glob.glob("**/*.[c|h|py|sh]", recursive=True):
|
||||||
if "meson-private" in fn:
|
if "meson-private" in fn:
|
||||||
continue
|
continue
|
||||||
if os.path.isdir(fn):
|
if os.path.isdir(fn):
|
||||||
continue
|
continue
|
||||||
if "config.h" in fn:
|
if fn.startswith(tuple(build_dirs)):
|
||||||
build_dir = os.path.dirname(fn)
|
|
||||||
continue
|
|
||||||
if build_dir and fn.startswith(build_dir):
|
|
||||||
continue
|
continue
|
||||||
if fn.startswith("subprojects"):
|
if fn.startswith("subprojects"):
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user