22 lines
536 B
Crystal
22 lines
536 B
Crystal
DELIMITER = "================================================================================"
|
|
|
|
LICENSES = String.build do |s|
|
|
if File.exists?("./LICENSE")
|
|
s.puts Dir.current.split("/").last
|
|
s.puts DELIMITER
|
|
s.puts File.read("./LICENSE")
|
|
s.puts DELIMITER
|
|
s.puts "\n\n"
|
|
end
|
|
|
|
Dir.glob("./lib/*/LICENSE", "./lib/*/license").each do |path|
|
|
s.puts path.match(/^\.\/lib\/([^\/]+)\//).try(&.[1]).to_s
|
|
s.puts DELIMITER
|
|
s.puts File.read(path)
|
|
s.puts DELIMITER
|
|
s.puts "\n\n"
|
|
end
|
|
end
|
|
|
|
puts LICENSES
|