diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-12-19 17:36:09 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-12-19 17:36:09 +0100 |
commit | 1c53b56871a36fdf58e58ee87ac6b56d4e3355f0 (patch) | |
tree | 1eba5f045a2660a3708b1ec91be838e397cb8335 /tools/check_license.rb | |
parent | Bug fixes (diff) | |
download | smolbote-1c53b56871a36fdf58e58ee87ac6b56d4e3355f0.tar.xz |
Changed license from GPL3+ to GPL3
Diffstat (limited to 'tools/check_license.rb')
-rwxr-xr-x | tools/check_license.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/check_license.rb b/tools/check_license.rb new file mode 100755 index 0000000..c519513 --- /dev/null +++ b/tools/check_license.rb @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby + +exit_code = 0 +file_names = Dir.glob("**/*.h") + Dir.glob("**/*.cpp") + +puts "Running in #{`pwd`}" + +# for each item in file_names +file_names.each do |file_name| + File.open(file_name) { |file| + if file.grep(/SPDX-License-Identifier/).empty? then + puts "Missing or incorrect license header: #{file_name}" + exit_code = 1 + end + } +end + +exit exit_code |