From 4ea9c055afea10deeee9fe3a6f1112f9db49b60b Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 16 Mar 2012 12:59:27 +0000 Subject: HOMEBREW_LIBRARY I got fed up writing HOMEBREW_REPOSITORY/"Library" and also correcting mistakes when I did HOMEBREW_PREFIX instead. --- Library/Homebrew/cmd/tap.rb | 3 --- Library/Homebrew/cmd/untap.rb | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index 6d1a596a6..6f235fede 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -1,6 +1,3 @@ - -HOMEBREW_LIBRARY = HOMEBREW_REPOSITORY/"Library" - module Homebrew extend self def tap diff --git a/Library/Homebrew/cmd/untap.rb b/Library/Homebrew/cmd/untap.rb index 92faf3069..51d99d913 100644 --- a/Library/Homebrew/cmd/untap.rb +++ b/Library/Homebrew/cmd/untap.rb @@ -3,15 +3,15 @@ require 'cmd/tap' # for tap_args module Homebrew extend self def untap user, repo = tap_args - tapd = HOMEBREW_PREFIX/"Library/Taps/#{user}-#{repo}" + tapd = HOMEBREW_LIBRARY/"Taps/#{user}-#{repo}" raise "No such tap!" unless tapd.directory? - gitignores = (HOMEBREW_PREFIX/"Library/Formula/.gitignore").read.split rescue [] + gitignores = (HOMEBREW_LIBRARY/"Formula/.gitignore").read.split rescue [] tapd.find_formula do |pn| bn = pn.basename.to_s - pn = HOMEBREW_REPOSITORY/"Library/Formula"/bn + pn = HOMEBREW_LIBRARY/"Formula/#{bn}" pn.delete if pn.symlink? and pn.realpath.to_s =~ %r[^#{tapd.realpath}] gitignores.delete(bn) end -- cgit v1.2.3