summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2025-04-01 14:33:45 -0300
committerGitHub <noreply@github.com>2025-04-01 14:33:45 -0300
commita738ada9dfac238a8c460e4cc887983f7cce1f32 (patch)
tree33b0376b3b320b942e2347beb75faea79c3b0aaa /scripts
parente6e7c07b08c436310cc9acfe9ff6892155425703 (diff)
parentcf7a7fe485373a3a376841728adb6eee422b9af4 (diff)
downloadmeta-freescale-nanbield.tar.gz
Merge pull request #2171 from mdrodrigo/topic/nanbieldnanbield
Add update-license-file in nanbield branch
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate-license-file18
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
4echo "# License Information" > LICENSE
5echo "" >> LICENSE
6echo "This file lists all licenses used by recipes in the meta-freescale-3rdparty layer." >> LICENSE
7echo "" >> LICENSE
8
9# Find all .bb and .inc files and extract license information
10find . -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
16done
17
18echo "LICENSE file has been generated and updated with current recipe licenses."