diff --git a/contrib/ci/check-license.py b/contrib/ci/check-license.py index 842002a42..c43a10dba 100755 --- a/contrib/ci/check-license.py +++ b/contrib/ci/check-license.py @@ -21,7 +21,7 @@ def __get_license(fn: str) -> str: def test_files() -> int: rc: int = 0 - ignore = "" + build_dir = "" for fn in glob.glob("**/*.[c|h|py|sh]", recursive=True): if "meson-private" in fn: @@ -29,9 +29,11 @@ def test_files() -> int: if os.path.isdir(fn): continue if "config.h" in fn: - ignore = os.path.dirname(fn) + build_dir = os.path.dirname(fn) continue - if fn.startswith(ignore): + if build_dir and fn.startswith(build_dir): + continue + if fn.startswith("subprojects"): continue lic = __get_license(fn) if not lic: