diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2025-04-01 14:40:59 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-01 14:40:59 -0300 |
commit | 2f83b211beff98d84632b186691ca1ffda34fa6c (patch) | |
tree | 88d2e1ac8386e40f77daf439f99ac9e82f6cdff0 /scripts/generate-license-file | |
parent | c525e0c19bdc46d45f71873b5f286f49abb69418 (diff) | |
parent | 49ceb8336782f25788c0f22e7973f98b0a02ecb3 (diff) | |
download | meta-freescale-2f83b211beff98d84632b186691ca1ffda34fa6c.tar.gz |
Merge pull request #2173 from mdrodrigo/topic/kirkstonekirkstone
Add update-license-file in kirkstone branch
Diffstat (limited to 'scripts/generate-license-file')
-rwxr-xr-x | scripts/generate-license-file | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/generate-license-file b/scripts/generate-license-file new file mode 100755 index 00000000..b6d43cd9 --- /dev/null +++ b/scripts/generate-license-file | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # Create or clear the LICENSE file | ||
4 | echo "# License Information" > LICENSE | ||
5 | echo "" >> LICENSE | ||
6 | echo "This file lists all licenses used by recipes in the meta-freescale-3rdparty layer." >> LICENSE | ||
7 | echo "" >> LICENSE | ||
8 | |||
9 | # Find all .bb and .inc files and extract license information | ||
10 | find . -type f \( -name "*.bb" -o -name "*.inc" \) | while read -r file; do | ||
11 | # Extract the license line from each recipe file, if it exists | ||
12 | license_line=$(grep -i "^LICENSE" "$file") | ||
13 | if [ -n "$license_line" ]; then | ||
14 | echo "$file: $license_line" >> LICENSE | ||
15 | fi | ||
16 | done | ||
17 | |||
18 | echo "LICENSE file has been generated and updated with current recipe licenses." | ||