Method: AptSpy2#fix

Defined in:
lib/apt/spy2.rb

#fixObject



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/apt/spy2.rb', line 23

def fix
  mirrors = retrieve(options[:country], use_launchpad?(options))
  working = filter(mirrors, options[:strict], false)
  print 'The closest mirror is: '
  puts (working[0]).to_s.bold.magenta
  unless options[:commit]
    puts 'Run with --commit to adjust /etc/apt/sources.list'.yellow
    return
  end

  puts 'Updating /etc/apt/sources.list'.yellow
  update(working[0])
end