mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-19 03:56:16 +00:00
fix brew on fresh macos
This commit is contained in:
+17
-1
@@ -3,10 +3,24 @@
|
||||
set -e
|
||||
set -u
|
||||
|
||||
{
|
||||
function _install_brew() {
|
||||
# Straight from https://brew.sh
|
||||
#/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
|
||||
needs_xcode="$(/usr/bin/xcode-select -p >/dev/null 2> /dev/null || echo "true")"
|
||||
if [[ -n "${needs_xcode}" ]]
|
||||
then
|
||||
echo ""
|
||||
echo ""
|
||||
echo "ERROR: Run this command to install XCode Command Line Tools first:"
|
||||
echo ""
|
||||
echo " xcode-select --install"
|
||||
echo ""
|
||||
echo "After the install, close this terminal, open a new one, and try again."
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# From Straight from https://brew.sh
|
||||
if ! [ -d "$HOME/.local/opt/brew" ]; then
|
||||
echo "Installing to '$HOME/.local/opt/brew'"
|
||||
@@ -35,3 +49,5 @@ set -u
|
||||
echo ' /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'
|
||||
echo ""
|
||||
}
|
||||
|
||||
_install_brew
|
||||
|
||||
Reference in New Issue
Block a user