aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/bottle_version.rb4
-rw-r--r--Library/Homebrew/test/test_bottle_versions.rb5
2 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/bottle_version.rb b/Library/Homebrew/bottle_version.rb
index 9da0bf3e3..477863297 100644
--- a/Library/Homebrew/bottle_version.rb
+++ b/Library/Homebrew/bottle_version.rb
@@ -7,6 +7,10 @@ class BottleVersion < Version
m = /-([\d\.]+-x86(_64)?)/.match(stem)
return m.captures.first unless m.nil?
+ # e.g. ssh-copy-id-6.2p2.bottle.tar.gz
+ m = /(\d\.(\d)+(p(\d)+)?)/.match(stem)
+ return m.captures.first unless m.nil?
+
super
end
end
diff --git a/Library/Homebrew/test/test_bottle_versions.rb b/Library/Homebrew/test/test_bottle_versions.rb
index d1cd002ca..b0b061d67 100644
--- a/Library/Homebrew/test/test_bottle_versions.rb
+++ b/Library/Homebrew/test/test_bottle_versions.rb
@@ -10,4 +10,9 @@ class BottleVersionParsingTests < Test::Unit::TestCase
assert_version_detected '2013.1.610569-x86_64',
'/usr/local/perforce-2013.1.610569-x86_64.mountain_lion.bottle.tar.gz'
end
+
+ def test_ssh_copy_id_style
+ assert_version_detected '6.2p2',
+ '/usr/local/ssh-copy-id-6.2p2.mountain_lion.bottle.tar.gz'
+ end
end