Main repository for Devuan's www.devuan.org.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
854 B

#!/usr/bin/env ruby
require 'typhoeus'
require 'yaml'
PKGS_FILE = File.expand_path('../../data/devuan.yml', __FILE__)
maintainers = []
packages = YAML.load_file(PKGS_FILE)['packages']
packages.each do |pkg|
name, email = $1.strip, $2.strip if pkg[:maintainer] =~ /^(.*) <(.*)>$/
puts "Error with #{pkg[:name]} - #{pkg[:maintainer]}" if name.nil?
next if name.nil?
next if name == 'Franco Lanza' # already as 'Franco (nextime) Lanza'
maintainers << { name: name, email: email } unless maintainers.map { |m| m[:name] }.include?(name)
end
p maintainers
MAINT_TXT = File.expand_path('../../data/maintainers.txt', __FILE__)
File.open(MAINT_TXT, 'w+') do |f|
maintainers.each do |m|
f.puts "#{m[:name]} <#{m[:email]}>\n"
end
end
# shell powa
`cat #{MAINT_TXT} | sort | uniq > #{MAINT_TXT}.s`
`mv #{MAINT_TXT}.s #{MAINT_TXT}`