2016-08-24 14:46:05 +01:00
|
|
|
unless ENV["HOMEBREW_BREW_FILE"]
|
|
|
|
raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!"
|
2015-04-28 22:37:26 -04:00
|
|
|
end
|
|
|
|
|
2018-10-18 21:42:43 -04:00
|
|
|
# Path to `bin/brew` main executable in `HOMEBREW_PREFIX`
|
2016-08-24 14:46:05 +01:00
|
|
|
HOMEBREW_BREW_FILE = Pathname.new(ENV["HOMEBREW_BREW_FILE"])
|
|
|
|
|
2015-04-28 22:37:26 -04:00
|
|
|
# Where we link under
|
2015-12-25 22:42:00 +00:00
|
|
|
HOMEBREW_PREFIX = Pathname.new(ENV["HOMEBREW_PREFIX"])
|
2015-04-28 22:37:26 -04:00
|
|
|
|
2018-10-18 21:42:43 -04:00
|
|
|
# Where `.git` is found
|
2015-12-25 22:42:00 +00:00
|
|
|
HOMEBREW_REPOSITORY = Pathname.new(ENV["HOMEBREW_REPOSITORY"])
|
2015-04-28 22:37:26 -04:00
|
|
|
|
2016-07-02 06:03:04 +02:00
|
|
|
# Where we store most of Homebrew, taps, and various metadata
|
2015-12-25 22:42:00 +00:00
|
|
|
HOMEBREW_LIBRARY = Pathname.new(ENV["HOMEBREW_LIBRARY"])
|
2016-07-02 06:03:04 +02:00
|
|
|
|
2016-07-15 19:03:45 +01:00
|
|
|
# Where shim scripts for various build and SCM tools are stored
|
|
|
|
HOMEBREW_SHIMS_PATH = HOMEBREW_LIBRARY/"Homebrew/shims"
|
2015-04-28 22:37:26 -04:00
|
|
|
|
2016-09-16 13:51:21 +01:00
|
|
|
# Where we store symlinks to currently linked kegs
|
2016-09-17 15:00:46 +01:00
|
|
|
HOMEBREW_LINKED_KEGS = HOMEBREW_PREFIX/"var/homebrew/linked"
|
2016-09-16 13:51:21 +01:00
|
|
|
|
2016-09-17 13:25:32 +01:00
|
|
|
# Where we store symlinks to currently version-pinned kegs
|
2016-09-17 15:00:46 +01:00
|
|
|
HOMEBREW_PINNED_KEGS = HOMEBREW_PREFIX/"var/homebrew/pinned"
|
2016-09-16 13:51:21 +01:00
|
|
|
|
2016-06-08 17:29:03 +08:00
|
|
|
# Where we store lock files
|
2018-09-06 18:38:43 +01:00
|
|
|
HOMEBREW_LOCKS = HOMEBREW_PREFIX/"var/homebrew/locks"
|
2016-06-08 17:29:03 +08:00
|
|
|
|
2015-12-25 22:42:00 +00:00
|
|
|
# Where we store built products
|
|
|
|
HOMEBREW_CELLAR = Pathname.new(ENV["HOMEBREW_CELLAR"])
|
2015-04-28 22:37:26 -04:00
|
|
|
|
2016-05-03 16:01:42 +08:00
|
|
|
# Where downloads (bottles, source tarballs, etc.) are cached
|
|
|
|
HOMEBREW_CACHE = Pathname.new(ENV["HOMEBREW_CACHE"])
|
|
|
|
|
|
|
|
# Where brews installed via URL are cached
|
|
|
|
HOMEBREW_CACHE_FORMULA = HOMEBREW_CACHE/"Formula"
|
|
|
|
|
2016-07-02 06:03:04 +02:00
|
|
|
# Where build, postinstall, and test logs of formulae are written to
|
2015-08-03 13:09:07 +01:00
|
|
|
HOMEBREW_LOGS = Pathname.new(ENV["HOMEBREW_LOGS"] || "~/Library/Logs/Homebrew/").expand_path
|
2015-04-28 22:37:26 -04:00
|
|
|
|
2018-10-18 21:42:43 -04:00
|
|
|
# Must use `/tmp` instead of `TMPDIR` because long paths break Unix domain sockets
|
2018-07-03 15:41:33 +01:00
|
|
|
HOMEBREW_TEMP = begin
|
2018-07-04 07:14:33 +01:00
|
|
|
# /tmp fallback is here for people auto-updating from a version where
|
|
|
|
# HOMEBREW_TEMP isn't set.
|
|
|
|
tmp = Pathname.new(ENV["HOMEBREW_TEMP"] || "/tmp")
|
2018-07-03 15:41:33 +01:00
|
|
|
tmp.mkpath unless tmp.exist?
|
|
|
|
tmp.realpath
|
|
|
|
end
|