aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAndre Arko2009-09-17 14:34:52 -0700
committerMax Howell2009-09-29 23:34:16 +0100
commitd3954d3d77e9e95327e2d54d98a9dae806acc24e (patch)
tree6f388c3d78f5c667ff0f7fe6062cf2a9562a9044 /Library
parent195e75c1b2c19c58fd62f6622833b1740987fcd1 (diff)
downloadbrew-d3954d3d77e9e95327e2d54d98a9dae806acc24e.tar.bz2
Add HOMEBREW_REPOSITORY prefix for `brew up`
Signed-off-by: Max Howell <max@methylblue.com> I removed whitespace changes and changed readlink to realpath as readlink raises if it's not a link.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/global.rb1
-rw-r--r--Library/Homebrew/update.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb
index 95e4c9ded..26975934e 100644
--- a/Library/Homebrew/global.rb
+++ b/Library/Homebrew/global.rb
@@ -36,6 +36,7 @@ end
HOMEBREW_PREFIX = (Pathname.getwd+__FILE__).dirname.parent.parent.cleanpath
HOMEBREW_CELLAR = HOMEBREW_PREFIX+'Cellar'
+HOMEBREW_REPOSITORY = HOMEBREW_CELLAR.realpath.parent
HOMEBREW_VERSION = 0.4
HOMEBREW_WWW = 'http://bit.ly/Homebrew'
diff --git a/Library/Homebrew/update.rb b/Library/Homebrew/update.rb
index 0e1bcb91f..09399fbde 100644
--- a/Library/Homebrew/update.rb
+++ b/Library/Homebrew/update.rb
@@ -68,7 +68,7 @@ class RefreshBrew
private
def in_prefix
- Dir.chdir(HOMEBREW_PREFIX) { yield }
+ Dir.chdir(HOMEBREW_REPOSITORY) { yield }
end
def execute(cmd)