aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2014-03-13 09:05:40 +0000
committerMike McQuaid2014-03-13 10:05:20 +0000
commit916e751596535177510f0c2043ecc16c392f12e2 (patch)
tree73223448c554f63755a7bdf8049da7194c6ab2b2 /Library
parent5b6d872459ce7f2bd6346130f2d7ab8099275908 (diff)
downloadbrew-916e751596535177510f0c2043ecc16c392f12e2.tar.bz2
keg: add delete_pyc_files! method.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/keg.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index c9bf9df8b..5beb7dc06 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -196,6 +196,13 @@ class Keg < Pathname
from.make_relative_symlink(self)
end
+ def delete_pyc_files!
+ Pathname.new(self).find do |pn|
+ next if pn.extname != '.pyc'
+ pn.delete
+ end
+ end
+
protected
def resolve_any_conflicts dst