Added Homebrew install function

Necessary to define the installation of Homebrew via a single function.
This was originally part of the macOS Configuration project but is now
located here instead.
This commit is contained in:
Brooke Kuhlmann
2021-02-21 13:18:29 -07:00
parent 71da0e7b1b
commit eaefe9fa04

View File

@@ -134,6 +134,15 @@ install_git_project() {
}
export -f install_git_project
# Installs Homebrew.
# Parameters: None.
install_homebrew() {
if ! command -v brew > /dev/null; then
/bin/bash -c "$(curl --location --fail --silent --show-error https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
}
export -f install_homebrew
# Installs a package.
# Parameters: $1 (required) - Package source path, $2 (required) - Application name.
install_pkg() {