aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Contributions
diff options
context:
space:
mode:
authorMike McQuaid2014-06-25 09:32:44 +0100
committerMike McQuaid2014-06-25 09:35:37 +0100
commit49658cd46b2ab792ff2fd9ce0a1f31c25e4a31bb (patch)
tree94fc97c7ed19fd3fbbf4407a29dfd34fb571c8c5 /Library/Contributions
parent2daabe9863bd430a696020419d3534d22cac9fbb (diff)
downloadbrew-49658cd46b2ab792ff2fd9ce0a1f31c25e4a31bb.tar.bz2
brew-versions: move to Contributions.
Eventually we'll move Contributions to a tap too. Closes Homebrew/homebrew#30298.
Diffstat (limited to 'Library/Contributions')
-rwxr-xr-xLibrary/Contributions/cmd/brew-versions.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/Library/Contributions/cmd/brew-versions.rb b/Library/Contributions/cmd/brew-versions.rb
new file mode 100755
index 000000000..3a0fd6b64
--- /dev/null
+++ b/Library/Contributions/cmd/brew-versions.rb
@@ -0,0 +1,19 @@
+require "formula_versions"
+
+raise "Please `brew install git` first" unless which "git"
+raise "Please `brew update` first" unless (HOMEBREW_REPOSITORY/".git").directory?
+raise FormulaUnspecifiedError if ARGV.named.empty?
+
+opoo <<-EOS.undent
+ brew-versions is unsupported and may be removed soon.
+ Please use the homebrew-versions tap instead:
+ https://github.com/Homebrew/homebrew-versions
+EOS
+ARGV.formulae.each do |f|
+ versions = FormulaVersions.new(f)
+ path = versions.repository_path
+ versions.each do |version, rev|
+ print "#{Tty.white}#{version.to_s.ljust(8)}#{Tty.reset} "
+ puts "git checkout #{rev} #{path}"
+ end
+end