Permalink
Browse files

Merge branch 'master' of http://github.com/mxcl/homebrew

  • Loading branch information...
2 parents e3e084c + 109c5eb commit 5d2590e8538a8c2340d11001a8fe8fc5218904fa @samgranieri committed Mar 19, 2012
@@ -132,4 +132,5 @@ def macos_version
end
ohai "Installation successful!"
+puts "You should run `brew doctor' *before* you install anything."
puts "Now type: brew help"
@@ -1,9 +1,9 @@
require 'formula'
class Mtr < Formula
- url 'ftp://ftp.bitwizard.nl/mtr/mtr-0.80.tar.gz'
+ url 'ftp://ftp.bitwizard.nl/mtr/mtr-0.82.tar.gz'
homepage 'http://www.bitwizard.nl/mtr/'
- md5 'fa68528eaec1757f52bacf9fea8c68a9'
+ sha1 'f1319de27324d85898a9df0a293a438bbaaa12b5'
depends_on 'gtk+' unless ARGV.include? "--no-gtk"
@@ -2,8 +2,8 @@
class Redis < Formula
homepage 'http://redis.io/'
- url 'http://redis.googlecode.com/files/redis-2.4.8.tar.gz'
- md5 'ac776d25f238b142d3d526cfcdc621ab'
+ url 'http://redis.googlecode.com/files/redis-2.4.9.tar.gz'
+ md5 'b3752496427b0a7e5ceea401f279aa24'
head 'https://github.com/antirez/redis.git', :branch => 'unstable'
@@ -10,6 +10,11 @@ def link
end
ARGV.kegs.each do |keg|
+ if keg.linked_keg_record.directory? and keg.linked_keg_record.realpath == keg
+ opoo "Already linked: #{keg}"
+ next
+ end
+
print "Linking #{keg}... " do
puts if ARGV.verbose?
puts "#{keg.link} symlinks created"
@@ -1,6 +1,6 @@
module Homebrew extend self
def unlink
- raise FormulaUnspecifiedError if ARGV.named.empty?
+ raise KegUnspecifiedError if ARGV.named.empty?
ARGV.kegs.each do |keg|
print "Unlinking #{keg}... "
@@ -16,6 +16,7 @@ def formulae
end
def kegs
+ rack = nil
require 'keg'
require 'formula'
@kegs ||= downcased_unique_named.collect do |name|
@@ -47,6 +48,17 @@ def kegs
Keg.new(linked_keg_ref.realpath)
end
end
+ rescue FormulaUnavailableError
+ if rack
+ raise <<-EOS.undent
+ Multiple kegs installed to #{rack}
+ However we don't know which one you refer to.
+ Please delete (with rm -rf!) all but one and then try again.
+ Sorry, we know this is lame.
+ EOS
+ else
+ raise
+ end
end
# self documenting perhaps?
@@ -102,9 +102,9 @@ def link
end
end
- (HOMEBREW_REPOSITORY/"Library/LinkedKegs"/fname).make_relative_symlink(self)
+ linked_keg_record.make_relative_symlink(self)
- return $n+$d
+ return $n + $d
end
protected
@@ -123,6 +123,14 @@ def resolve_any_conflicts dst
puts "Won't resolve conflicts for symlink #{dst} as it doesn't resolve into the Cellar" if ARGV.verbose?
end
+ def make_relative_symlink dst, src
+ if dst.exist? and dst.realpath == src.realpath
+ puts "Skipping; already exists: #{dst}" if ARGV.verbose?
+ else
+ dst.make_relative_symlink src
+ end
+ end
+
# symlinks the contents of self+foo recursively into /usr/local/foo
def link_dir foo
root = self+foo
@@ -141,10 +149,10 @@ def link_dir foo
when :skip_file
Find.prune
when :info
- dst.make_relative_symlink(src)
+ make_relative_symlink dst, src
dst.install_info
else
- dst.make_relative_symlink(src)
+ make_relative_symlink dst, src
end
elsif src.directory?
# if the dst dir already exists, then great! walk the rest of the tree tho
@@ -161,7 +169,7 @@ def link_dir foo
dst.mkpath unless resolve_any_conflicts(dst)
else
unless resolve_any_conflicts(dst)
- dst.make_relative_symlink(src)
+ make_relative_symlink dst, src
Find.prune
end
end

0 comments on commit 5d2590e

Please sign in to comment.