Sha256: fbd515104fb487988c16a79336cfd62d2afc47bb41552767bed5fca2178b47ce
Contents?: true
Size: 374 Bytes
Versions: 17
Compression:
Stored size: 374 Bytes
Contents
require 'net/http' require 'uri' apt_servers = Net::HTTP.get(URI.parse('http://mirrors.ubuntu.com/mirrors.txt')).split("\n") # ftp.riken.jp is unstable and slow? apt_servers.delete('http://ftp.riken.jp/Linux/ubuntu/') apt_server = apt_servers[rand(apt_servers.size)] execute "sed -i -e 's| \\(http[^ ]\\+\\)| #{apt_server}|g' /etc/apt/sources.list" include_recipe 'apt'
Version data entries
17 entries across 17 versions & 1 rubygems