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
|
|
|
|
|
2016-08-24 14:46:05 +01:00
|
|
|
# Path to `bin/brew` main executable in HOMEBREW_PREFIX
|
|
|
|
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
|
|
|
|
|
|
|
# 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
|
2016-09-16 13:51:21 +01:00
|
|
|
HOMEBREW_LOCK_DIR = 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
|
|
|
|
2016-01-30 21:40:26 -05: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
|
|
|
|
tmp = Pathname.new(ENV["HOMEBREW_TEMP"])
|
|
|
|
tmp.mkpath unless tmp.exist?
|
|
|
|
tmp.realpath
|
|
|
|
end
|
2015-04-28 22:37:27 -04:00
|
|
|
|
2015-08-03 13:09:07 +01:00
|
|
|
unless defined? HOMEBREW_LIBRARY_PATH
|
2016-07-02 06:03:04 +02:00
|
|
|
# Root of the Homebrew code base
|
2016-02-21 00:24:36 -08:00
|
|
|
HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent
|
2015-04-28 22:37:27 -04:00
|
|
|
end
|
|
|
|
|
2016-07-02 06:03:04 +02:00
|
|
|
# Load path used by standalone scripts to access the Homebrew code base
|
2018-06-13 07:35:04 +02:00
|
|
|
HOMEBREW_LOAD_PATH = [
|
|
|
|
HOMEBREW_LIBRARY_PATH,
|
|
|
|
HOMEBREW_LIBRARY_PATH/"cask/lib",
|
|
|
|
].join(File::PATH_SEPARATOR)
|