diff options
| author | Max Howell | 2009-09-29 21:17:44 +0100 |
|---|---|---|
| committer | Max Howell | 2009-09-30 18:11:49 +0100 |
| commit | a18bc0ffec12a35a13259b5bf56ca1832d4b3cd1 (patch) | |
| tree | 28b885df824026dacf610584340e56ad38794cf3 /bin | |
| parent | 1faae0ee2c8037dbe0fbfd6c5db56e1cf5c582ae (diff) | |
| download | homebrew-a18bc0ffec12a35a13259b5bf56ca1832d4b3cd1.tar.bz2 | |
brew list --unbrewed fix
Determine all directories that aren't Homebrew ones.
Exec find.
I prefer to keep short stuff in bin/brew so people reading the code have a better idea of what happens, and what sort of functions are useful for the sorts of things we do with Homebrew.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/brew | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -40,7 +40,11 @@ begin when 'ls', 'list' if ARGV.flag? '--unbrewed' - puts unbrewed_files + # Taken from the homebrew wiki (http://wiki.github.com/mxcl/homebrew) + dirs = HOMEBREW_PREFIX.children.select { |pn| pn.directory? }.collect { |pn| pn.basename.to_s } + dirs -= ['Library', 'Cellar', '.git'] + Dir.chdir HOMEBREW_PREFIX + exec 'find', *dirs + %w[-type f ( ! -iname .ds_store ! -iname brew )] elsif ARGV.named_empty? ENV['CLICOLOR']=nil exec 'ls', *ARGV.options<<HOMEBREW_CELLAR |
