Make the full setup bootstrappable with a single command on a fresh Mac:
curl -fsSL https://raw.githubusercontent.com/ben196888/mac-set-up/master/install.sh | shNo cloning, no unzipping, no chmod. Just one line.
The current install.sh uses relative paths to call sibling scripts (./cli_tools.sh, ./git/install.sh, etc). When piped through curl | sh, there is no working directory with those files — the script runs in isolation and immediately fails.
Create a bootstrap.sh (or make install.sh curl-safe) that:
- Detects if running via
curl | sh(no local files present) - Clones the repo to a temp directory (
/tmp/mac-set-up) cds into it and runsinstall.shfrom there
Example pattern:
REPO="https://github.com/ben196888/mac-set-up.git"
INSTALL_DIR="/tmp/mac-set-up"
if [ ! -d "$INSTALL_DIR" ]; then
git clone --depth 1 "$REPO" "$INSTALL_DIR"
fi
cd "$INSTALL_DIR" && bash install.shOn a fresh Mac, git triggers the Xcode CLT install prompt. Options:
- A — instruct the user to accept the Xcode CLT prompt before running the one-liner
- B — use the GitHub ZIP download API instead of
git clone(no git required) - C — install Homebrew first via its own one-liner, then
brew install git, then clone
Option C aligns with how essential.sh already works and is the most reliable.
Before enabling the one-liner, all scripts must be safe to re-run:
- Each
brew installshould be guarded or rely on Homebrew's built-in idempotency - SSH key generation, GitHub CLI auth, and other interactive steps need skip guards
Replace the current multi-step setup instructions with:
curl -fsSL https://raw.githubusercontent.com/ben196888/mac-set-up/master/bootstrap.sh | sh- Checkpoint/resume for interrupted installs
- Selective install (install only languages, only tools, etc.)
- Version pinning for installed tools