2016-02-05 22:11:04 +08:00
|
|
|
if ENV["HOMEBREW_BREW_FILE"]
|
2016-07-02 06:03:04 +02:00
|
|
|
# Path to `bin/brew` main executable in {HOMEBREW_PREFIX}
|
2016-02-05 22:11:04 +08:00
|
|
|
HOMEBREW_BREW_FILE = Pathname.new(ENV["HOMEBREW_BREW_FILE"])
|
|
|
|
else
|
2016-01-27 10:29:58 +00:00
|
|
|
odie "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!"
|
2015-04-28 22:37:26 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
# Where wrapper scripts for Git, Subversion, and various build tools are stored
|
2016-03-20 01:44:36 +08:00
|
|
|
HOMEBREW_ENV_PATH = HOMEBREW_LIBRARY/"ENV"
|
2015-04-28 22:37:26 -04:00
|
|
|
|
2016-06-08 17:29:03 +08:00
|
|
|
# Where we store lock files
|
|
|
|
HOMEBREW_LOCK_DIR = HOMEBREW_LIBRARY/"Locks"
|
|
|
|
|
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
|
2015-08-03 13:09:07 +01:00
|
|
|
HOMEBREW_TEMP = Pathname.new(ENV.fetch("HOMEBREW_TEMP", "/tmp"))
|
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
|
2015-04-28 22:37:27 -04:00
|
|
|
HOMEBREW_LOAD_PATH = HOMEBREW_LIBRARY_PATH
|