categories = Dir.glob("ports/*").select { |category| if File.directory? category Dir.chdir(category) do ports = Dir.glob("*").select { |port| if File.directory? port descr = "#{ port }/pkg/DESCR" if File.exists?(descr) puts descr = File.read(descr) end end } end end }