diff options
| author | Jack Nagel | 2014-06-30 20:09:13 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-30 20:30:02 -0500 |
| commit | 30e273c2d1dd26124000caa6489c68f3d9fd29ef (patch) | |
| tree | 941850e7a778be567e42662e29cfa51ac4680aeb | |
| parent | 4c05d411f3345c083c933b3666229cd555162e0d (diff) | |
| download | brew-30e273c2d1dd26124000caa6489c68f3d9fd29ef.tar.bz2 | |
Group methods that operate on the linked keg record
| -rw-r--r-- | Library/Homebrew/keg.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 862c9d1b5..791448e92 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -151,6 +151,17 @@ class Keg path.rename(*args) end + def linked? + linked_keg_record.symlink? && + linked_keg_record.directory? && + path == linked_keg_record.resolved_path + end + + def remove_linked_keg_record + linked_keg_record.unlink + linked_keg_record.parent.rmdir_if_possible + end + def uninstall path.rmtree path.parent.rmdir_if_possible @@ -191,21 +202,10 @@ class Keg ObserverPathnameExtension.total end - def remove_linked_keg_record - linked_keg_record.unlink - linked_keg_record.parent.rmdir_if_possible - end - def lock FormulaLock.new(name).with_lock { yield } end - def linked? - linked_keg_record.symlink? && - linked_keg_record.directory? && - path == linked_keg_record.resolved_path - end - def completion_installed? shell dir = case shell when :bash then path.join("etc", "bash_completion.d") |
