projects
/
webi-installers
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8292f12
)
fix brew on fresh macos
author
AJ ONeal
<aj@therootcompany.com>
Mon, 5 Oct 2020 23:07:10 +0000
(23:07 +0000)
committer
AJ ONeal
<aj@therootcompany.com>
Mon, 5 Oct 2020 23:07:10 +0000
(23:07 +0000)
brew/install.sh
patch
|
blob
|
history
diff --git
a/brew/install.sh
b/brew/install.sh
index 93220ddb246fd61e72959745bb80f08792ea0f0f..6668e3e5e539328814e538cb095b08b3a38c6781 100644
(file)
--- a/
brew/install.sh
+++ b/
brew/install.sh
@@
-3,10
+3,24
@@
set -e
set -u
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)"
# 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'"
# 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 ""
}
echo ' /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"'
echo ""
}
+
+_install_brew