Files
dotfiles/script/install.d/02-brew.sh

20 lines
485 B
Bash

#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# (macOS only) Install homebrew.
#
if [[ "$OSTYPE" == "darwin"* ]]; then
export NONINTERACTIVE=1
if ! command -v brew &> /dev/null; then
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
brew update
brew --version
unset NONINTERACTIVE
fi