aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/global.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/global.rb')
-rw-r--r--Library/Homebrew/global.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb
index 3cc1024e7..56e4ad4ea 100644
--- a/Library/Homebrew/global.rb
+++ b/Library/Homebrew/global.rb
@@ -10,12 +10,12 @@ ARGV.extend(HomebrewArgvExtension)
HOMEBREW_VERSION = '0.7.1'
HOMEBREW_WWW = 'http://mxcl.github.com/homebrew/'
-if Process.uid == 0
+HOMEBREW_CACHE = if Process.uid == 0
# technically this is not the correct place, this cache is for *all users*
# so in that case, maybe we should always use it, root or not?
- HOMEBREW_CACHE=Pathname.new("/Library/Caches/Homebrew")
+ Pathname.new("/Library/Caches/Homebrew")
else
- HOMEBREW_CACHE=Pathname.new("~/Library/Caches/Homebrew").expand_path
+ Pathname.new("~/Library/Caches/Homebrew").expand_path
end
if not defined? HOMEBREW_BREW_FILE
@@ -27,10 +27,10 @@ HOMEBREW_REPOSITORY = Pathname.new(HOMEBREW_BREW_FILE).realpath.dirname.parent #
# Where we store built products; /usr/local/Cellar if it exists,
# otherwise a Cellar relative to the Repository.
-if (HOMEBREW_PREFIX+'Cellar').exist?
- HOMEBREW_CELLAR = HOMEBREW_PREFIX+'Cellar'
+HOMEBREW_CELLAR = if (HOMEBREW_PREFIX/"Cellar").exist?
+ HOMEBREW_PREFIX/"Cellar"
else
- HOMEBREW_CELLAR = HOMEBREW_REPOSITORY+'Cellar'
+ HOMEBREW_REPOSITORY/"Cellar"
end
MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp