[PATCH] Added rake task to verify the status of licenses in the project
Francesco Vollero
fvollero at redhat.com
Mon Dec 5 17:25:56 UTC 2011
Signed-off-by: Francesco Vollero <fvollero at redhat.com>
---
src/lib/tasks/apache_license.rake | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
create mode 100644 src/lib/tasks/apache_license.rake
diff --git a/src/lib/tasks/apache_license.rake b/src/lib/tasks/apache_license.rake
new file mode 100644
index 0000000..4e444bd
--- /dev/null
+++ b/src/lib/tasks/apache_license.rake
@@ -0,0 +1,16 @@
+namespace :license do
+ desc 'Verify that every file contains apache license'
+
+ task :verify do |t|
+
+ puts "Files that contain GPL License: %d" %
+ (%x[find ./ -type f -iname *.rb -exec grep -qE "http://www.gnu.org/copyleft/gpl.html" {} \\; -print |wc -l])
+ puts "Files that does not have GPL nor ASL: %d" %
+ (%x[find ./ -type f -iname *.rb \\! -exec grep -qE "Copyright|copyleft" {} \\; -print|wc -l])
+
+ puts "Files that contain Apache license: %d" %
+ (%x[find ./ -type f -iname *.rb -exec grep -qE "Apache License" {} \\; -print|wc -l])
+ end
+
+ #namespace end
+end
--
1.7.4.4
More information about the aeolus-devel
mailing list