blob: 130d0576da7402100e07ae8f2d1def78f57b91a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/bash
set -euo pipefail
if command -v brew &>/dev/null
then
echo >&1 "brew is already installed, nothing to do here"
exit 0
fi
echo >&1 "installing brew"
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# This is intentionally in single quotes for echo to append properly
# shellcheck disable=SC2016
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bash_profile
eval "$(/opt/homebrew/bin/brew shellenv)"
# shellcheck source=/dev/null
source ~/.bash_profile
brew update
|