Smaller patch to licensecheck. Patch submitted upstream.

This commit is contained in:
Laurent Rineau
2012-02-10 11:40:09 +00:00
parent ddd16e2a2b
commit c8dcd583cb
2 changed files with 4 additions and 4 deletions
@@ -9,7 +9,7 @@ setopt extendedglob
for p in ^*build*(/); do
if [ -d $p/include ]; then
licFile=$p/package_info/$p/license.txt
l=`licensecheck -r $p/include $p/src | awk -F': ' '{print $2}' | grep -v BSL | sort -u`
l=`licensecheck -r $p/include $p/src | awk -F': ' '{print $2}' | grep -v BSL | sed -e 's/GENERATED FILE//' | sort -u`
if [ "x`echo $l | wc -l`" = "x1" ]; then
echo $l > "$licFile"
elif [ -z "`echo $l | grep -Eq '^L?GPL \(v3 or later\) *$'`" ]; then
+3 -3
View File
@@ -406,9 +406,9 @@ sub parselicense($) {
$extrainfo = " (with Qt exception)$extrainfo"
}
# if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (EDIT|delete this file)|Generated (automatically|by|from)|generated.*file)/i) {
# $license = "GENERATED FILE";
# }
if ($licensetext =~ /(All changes made in this file will be lost|DO NOT (EDIT|delete this file)|Generated (automatically|by|from)|generated.*file)/i) {
$license = "GENERATED FILE";
}
if ($licensetext =~ /(is free software.? )?[Yy]ou can redistribute (it|them) and\/or +modify (it|them) under the terms of the (GNU (Library|Lesser) General Public License|LGPL)/i) {
$license = "LGPL$gplver$extrainfo $license";