add3prf.py: Add detection of LICENSE-BSD file
Add the ability to detect a BSD_LIKE license based on the existance of
LICENSE-BSD file (just like LICENSE-MIT).
Bug: 321983331
Test: Added unit test and tested against the zerocopy crate
Change-Id: I694a858e33d0c2e6865e4fae77a0287d215076fe
diff --git a/scripts/add3prf.py b/scripts/add3prf.py
index 60dfcc1..6c8185a 100755
--- a/scripts/add3prf.py
+++ b/scripts/add3prf.py
@@ -207,8 +207,10 @@
lowered_name = os.path.splitext(license_file.lower())[0]
if lowered_name == "license-apache":
licenses.append(License(LicenseType.APACHE2, LicenseGroup.NOTICE, license_file))
- if lowered_name == "license-boost":
+ elif lowered_name == "license-boost":
licenses.append(License(LicenseType.BOOST, LicenseGroup.NOTICE, license_file))
+ elif lowered_name == "license-bsd":
+ licenses.append(License(LicenseType.BSD_LIKE, LicenseGroup.NOTICE, license_file))
elif lowered_name == "license-mit":
licenses.append(License(LicenseType.MIT, LicenseGroup.NOTICE, license_file))
elif lowered_name == "license-0bsd":