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.
 
 
 
 
 

37 lines
854 B

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