[Openvas-commits] r12199 - trunk/openvas-plugins/tools

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Nov 25 17:41:37 CET 2011


Author: mime
Date: 2011-11-25 17:41:37 +0100 (Fri, 25 Nov 2011)
New Revision: 12199

Modified:
   trunk/openvas-plugins/tools/check_gpl_header.sh
Log:
Bugfix

Modified: trunk/openvas-plugins/tools/check_gpl_header.sh
===================================================================
--- trunk/openvas-plugins/tools/check_gpl_header.sh	2011-11-25 15:22:02 UTC (rev 12198)
+++ trunk/openvas-plugins/tools/check_gpl_header.sh	2011-11-25 16:41:37 UTC (rev 12199)
@@ -73,19 +73,21 @@
 
 for FILE in $FILES; do
 
-  check=`awk \
-  	    '/This program is free software. you can redistribute it and.or modify/ , /as published by the Free Software Foundation/  { \
-	        if ( tolower($0) ~ "it under the terms of the gnu general public license version 2") { \
-		  getline; \
-		  if( tolower($0) ~ "or at your option, gnu general public license version 3") { \
-		    print "GPLv2_or_v3"; exit;  } \
-   	          else if ($0 ~ "or any later version") { \
-		    print "GPLv2plus"; exit;  } \
-		  else { \
-		    print "GPLv2"; exit; } \
-		} \
-	    }' \
-	    "$FILE"`;
+  check=`awk '/This program is free software. you can redistribute it and.or/ , /#$/  { \
+                if ( tolower($0) ~ "it under the terms of the gnu general public license") { \
+                  getline;  \
+                  if( tolower($0) ~ "or at your option, gnu general public license version 3") { \
+                    print "GPLv2_or_v3"; exit;  } \
+                  else if ($0 ~ "or any later version" || $0 ~ "either version 2") { \
+                    if($0 ~ "either version 2") { \
+                      getline; \
+                     if($0 ~ "any later version") { print "GPLv2plus"; exit; } \
+                    } else { print "GPLv2plus"; exit; } \
+                  } \
+                  else { \
+                    print "GPLv2"; exit; } \
+                } \
+            }' "$FILE"`;
 
   case "$check" in
 



More information about the Openvas-commits mailing list