- Moved all files from mac_os/ subdirectory to repository root - Updated README.adoc to reflect simplified architecture - Updated QUICK_INSTALL.md with all current apps - Added claude-cli to install.sh and bin/install_homebrew_formulas - Repository now shows clean file structure without nested mac_os folder - Documentation now accurately describes opinionated installer approach Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
28 lines
870 B
Bash
28 lines
870 B
Bash
#! /usr/bin/env bash
|
|
|
|
# Defines software installer functions.
|
|
|
|
# Label: Install Homebrew
|
|
# Description: Install and setup Homebrew.
|
|
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)"
|
|
|
|
# Determine Homebrew path based on architecture
|
|
local brew_path="/opt/homebrew/bin/brew"
|
|
if [[ "$(/usr/bin/arch)" != "arm64" ]]; then
|
|
brew_path="/usr/local/bin/brew"
|
|
fi
|
|
|
|
# Add to shell profile for future sessions
|
|
if [[ ! -f "$HOME/.zprofile" ]] || ! grep -q "brew shellenv" "$HOME/.zprofile"; then
|
|
echo >> "$HOME/.zprofile"
|
|
echo "eval \"\$($brew_path shellenv)\"" >> "$HOME/.zprofile"
|
|
fi
|
|
|
|
# Set up PATH for current session
|
|
eval "$($brew_path shellenv)"
|
|
fi
|
|
}
|
|
export -f install_homebrew
|