aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMichael Dippery2010-09-02 11:47:18 -0400
committerAdam Vandenberg2010-11-05 19:44:56 -0700
commite0c23d670dc2a58f4db3f7268e75c8699b237a5d (patch)
treee8741e4f06a3fbdcf725dcbf91754e72c7bd665a /Library
parent2712dd6bccea139f722ac113b2f8e85913a34d6a (diff)
downloadbrew-e0c23d670dc2a58f4db3f7268e75c8699b237a5d.tar.bz2
More .DS_Store ignoring
* Don't link .DS_Store files * Don't list .DS_Store files in `brew info` Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew.h.rb1
-rw-r--r--Library/Homebrew/extend/pathname.rb2
-rw-r--r--Library/Homebrew/keg.rb2
3 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb
index ae376707d..6f3ed8ded 100644
--- a/Library/Homebrew/brew.h.rb
+++ b/Library/Homebrew/brew.h.rb
@@ -198,6 +198,7 @@ def info f
if f.prefix.parent.directory?
kids=f.prefix.parent.children
kids.each do |keg|
+ next if keg.basename.to_s == '.DS_Store'
print "#{keg} (#{keg.abv})"
print " *" if f.installed_prefix == keg and kids.length > 1
puts
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 009cdfa48..f61a69e09 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -92,7 +92,7 @@ class Pathname
def abv
out=''
- n=`find #{to_s} -type f | wc -l`.to_i
+ n=`find #{to_s} -type f ! -name .DS_Store | wc -l`.to_i
out<<"#{n} files, " if n > 1
out<<`/usr/bin/du -hd0 #{to_s} | cut -d"\t" -f1`.strip
end
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index 854442dc9..e278a5ce7 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -98,7 +98,7 @@ protected
dst.extend ObserverPathnameExtension
if src.file?
- dst.make_relative_symlink src
+ dst.make_relative_symlink src unless File.basename(src) == '.DS_Store'
elsif src.directory?
# if the dst dir already exists, then great! walk the rest of the tree tho
next if dst.directory? and not dst.symlink?