This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem_cmd = ENV["GEM_CMD"] || 'sudo gem' | |
STDIN.map { |l| l.strip }.each { |l| | |
gem, versions = l.split(' ', 2) | |
versions = versions.gsub(/[\(\)]/, '').split(', ') | |
versions.each { |version| | |
cmd = "#{gem_cmd} install #{gem} -v #{version}" | |
puts cmd if ENV["PRETEND"] or ENV["ECHO"] | |
system cmd unless ENV["PRETEND"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#gem_cmd = ENV["GEM_CMD"] || 'sudo gem' | |
gem_cmd = 'gem' | |
STDIN.map { |l| l.strip }.each { |l| | |
gem, versions = l.split(' ', 2) | |
versions = versions.gsub(/[\(\)]/, '').split(', ') | |
versions.each { |version| | |
cmd = "#{gem_cmd} install #{gem} -v #{version} --no-ri --no-rdoc" |