From b7598ff0c522e56f0a42706176f2fa621d9a1c8e Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 28 Sep 2020 01:23:00 +0200 Subject: Add missing filetypes for systemd --- scripts/build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'scripts/build') diff --git a/scripts/build b/scripts/build index bc5cd126..dd0af0c0 100755 --- a/scripts/build +++ b/scripts/build @@ -738,8 +738,15 @@ def show_warnings(all_filetypes, expected_filetypes) [f["extensions"], f["ignored_extensions"]].compact.flatten.map { |e| "*." + e } end + all_handled_regexps = Hash[all_handled.group_by { |a, b| a }.map { |a, b| [a, b[1]] }.map do |a, b| + [a, Regexp.union(b.map { |x| Regexp.escape(x).gsub('\\*', '.*') })] + end] + for name, e in all_expected - all_handled - if e.match?(/\/\*\.[^\/]+$/) && all_handled.include?([name, e.split('/').last]) + if e.match?(/\/\*?\.[^\/]+$/) && all_handled.include?([name, e.split('/').last.gsub('*', '')]) + next + end + if e.include?('*') && all_handled_regexps[name].match?(e) next end puts "Missing for #{name}: #{e}" -- cgit v1.2.3