#! /usr/bin/env ruby # # license-test - a simple license checker # # Copyright (C) 2005 Satoru Takabayashi # All rights reserved. # This is free software with ABSOLUTELY NO WARRANTY. # # You can redistribute it and/or modify it under the terms of # the GNU General Public License version 2. # require 'gonzui/license' include Gonzui ARGV.each {|file_name| content = File.read(file_name) detector = LicenseDetector.new(content) license = detector.detect printf("%s: %s\n", file_name, license.abbrev.to_s) }