From 7c1af56e43929ec004b02632c401be81b802433a Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Wed, 26 Aug 2020 14:28:23 -0400 Subject: [PATCH] metafiles: copy all license files --- Library/Homebrew/metafiles.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/metafiles.rb b/Library/Homebrew/metafiles.rb index 95404030ff..5b8cd0da05 100644 --- a/Library/Homebrew/metafiles.rb +++ b/Library/Homebrew/metafiles.rb @@ -4,15 +4,13 @@ # # @api private module Metafiles + LICENSES = Set.new(%w[copying copyright license licence]).freeze # https://github.com/github/markup#markups EXTENSIONS = Set.new(%w[ .adoc .asc .asciidoc .creole .html .markdown .md .mdown .mediawiki .mkdn .org .pod .rdoc .rst .rtf .textile .txt .wiki ]).freeze - BASENAMES = Set.new(%w[ - about authors changelog changes copying copyright history license licence - news notes notice readme todo - ]).freeze + BASENAMES = Set.new(%w[about authors changelog changes history news notes notice readme todo]).freeze module_function @@ -24,6 +22,8 @@ module Metafiles def copy?(file) file = file.downcase + return true if LICENSES.include? file.split(".").first + ext = File.extname(file) file = File.basename(file, ext) if EXTENSIONS.include?(ext) BASENAMES.include?(file)