Last active
August 29, 2015 14:21
-
-
Save segiddins/6aa5799e1844907e7d6c to your computer and use it in GitHub Desktop.
Run a shell command in each rbenv version installed
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/ruby | |
versions = `rbenv versions --bare`.split("\n").map(&:strip) | |
warn "rbenv not installed" && exit(1) unless $?.success? | |
versions.each do |v| | |
puts "rbenv shell #{v}" | |
puts | |
system({"RBENV_VERSION" => v}, ARGV.join(' ')) | |
puts '-' * 80 | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment