summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/create.py
diff options
context:
space:
mode:
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>2021-10-20 09:40:14 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-23 17:41:46 +0100
commit189c0297632968900715d7a4a5edcdf3a56e25f5 (patch)
tree3c15da209af3f126e4cd43d9c8e5b7fc95999798 /scripts/lib/recipetool/create.py
parente33994157abbea897ceaf465f9d2a99a9c8212b1 (diff)
downloadopenembedded-core-contrib-189c0297632968900715d7a4a5edcdf3a56e25f5.tar.gz
recipetool: Simplify common source files skip in guess_license
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/recipetool/create.py')
-rw-r--r--scripts/lib/recipetool/create.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index 3b58d6fa82..5a267fb57c 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -1188,10 +1188,11 @@ def guess_license(srctree, d):
licenses = []
licspecs = ['*LICEN[CS]E*', 'COPYING*', '*[Ll]icense*', 'LEGAL*', '[Ll]egal*', '*GPL*', 'README.lic*', 'COPYRIGHT*', '[Cc]opyright*', 'e[dp]l-v10']
+ skip_extensions = (".html", ".js", ".json", ".svg", ".ts")
licfiles = []
for root, dirs, files in os.walk(srctree):
for fn in files:
- if fn.endswith(".html") or fn.endswith(".js") or fn.endswith(".json") or fn.endswith(".svg") or fn.endswith(".ts"):
+ if fn.endswith(skip_extensions):
continue
for spec in licspecs:
if fnmatch.fnmatch(fn, spec):