Skip to content
Snippets Groups Projects
Unverified Commit 039a4ee4 authored by William Woodruff's avatar William Woodruff
Browse files

brew.sh: Move HOMEBREW_TEMP declaration

Additionally, assign HOMEBREW_TEMP based on the host
system (/tmp for Linux, /private/tmp for macOS).
parent a8bcb5df
No related branches found
No related tags found
No related merge requests found
......@@ -108,6 +108,8 @@ then
then
HOMEBREW_CACHE="$HOME/Library/Caches/Homebrew"
fi
HOMEBREW_TEMP="${HOMEBREW_TEMP:-/private/tmp}"
else
HOMEBREW_PROCESSOR="$(uname -m)"
HOMEBREW_PRODUCT="${HOMEBREW_SYSTEM}brew"
......@@ -124,6 +126,8 @@ else
HOMEBREW_CACHE="$HOME/.cache/Homebrew"
fi
fi
HOMEBREW_TEMP="${HOMEBREW_TEMP:-/tmp}"
fi
if [[ -n "$HOMEBREW_FORCE_BREWED_CURL" &&
......
......@@ -21,7 +21,6 @@ symlink_target_directory() {
BREW_FILE_DIRECTORY="$(quiet_cd "${0%/*}/" && pwd -P)"
HOMEBREW_BREW_FILE="${BREW_FILE_DIRECTORY%/}/${0##*/}"
HOMEBREW_PREFIX="${HOMEBREW_BREW_FILE%/*/*}"
HOMEBREW_TEMP="${HOMEBREW_TEMP:-/private/tmp}"
# Default to / prefix if unset or the bin/brew file.
if [[ -z "$HOMEBREW_PREFIX" || "$HOMEBREW_PREFIX" = "$HOMEBREW_BREW_FILE" ]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment