brew.sh: changes from Linuxbrew (Linux fork)

These fixes do two things:

- set HOMEBREW_MACOS_VERSION to 0 on non-HOMEBREW_MACOS machines
- set HOMEBREW_CURL to Homebrew'd curl
This commit is contained in:
Maxim Belkin 2018-02-15 11:43:20 -06:00
parent 988e805448
commit e5f4160d3e
No known key found for this signature in database
GPG Key ID: AC71560D4C5F2338

View File

@ -111,10 +111,16 @@ then
else
HOMEBREW_PROCESSOR="$(uname -m)"
HOMEBREW_PRODUCT="${HOMEBREW_SYSTEM}brew"
HOMEBREW_MACOS_VERSION=0
[[ -n "$HOMEBREW_LINUX" ]] && HOMEBREW_OS_VERSION="$(lsb_release -sd 2>/dev/null)"
: "${HOMEBREW_OS_VERSION:=$(uname -r)}"
HOMEBREW_OS_USER_AGENT_VERSION="$HOMEBREW_OS_VERSION"
if [[ -x "$HOMEBREW_PREFIX/opt/curl/bin/curl" ]]
then
HOMEBREW_CURL="$HOMEBREW_PREFIX/opt/curl/bin/curl"
fi
if [[ -z "$HOMEBREW_CACHE" ]]
then
if [[ -n "$XDG_CACHE_HOME" ]]