diff options
| author | Otavio Salvador <otavio@ossystems.com.br> | 2025-04-01 14:56:09 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-01 14:56:09 -0300 |
| commit | 74291c5ee1daac70b2c682f59c072b757f908e65 (patch) | |
| tree | 8c4196ffc9a603b4bd2f5854da308188f9c92a26 /scripts | |
| parent | c0c3b6108837ff232831b67c9ca87fb5b891182a (diff) | |
| parent | 9181f0c3766c47190df31d7e743b9ae46e3b73a5 (diff) | |
| download | meta-freescale-gatesgarth.tar.gz | |
Merge pull request #2176 from mdrodrigo/topic/gatesgarthgatesgarth
Add update-license-file in gatesgath branch
Diffstat (limited to 'scripts')
| -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 000000000..b6d43cd9f --- /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." | ||
