Skip to content

Instantly share code, notes, and snippets.

@kimizuy
Created February 14, 2026 05:58
Show Gist options
  • Select an option

  • Save kimizuy/b5c1a148b44f3ca52b6791c8f5b99079 to your computer and use it in GitHub Desktop.

Select an option

Save kimizuy/b5c1a148b44f3ca52b6791c8f5b99079 to your computer and use it in GitHub Desktop.
Dotfiles bootstrap entrypoint for a fresh Mac
#!/bin/bash
# Dotfiles bootstrap entrypoint — designed to be hosted on a public Gist:
# curl -fsSL https://gist.githubusercontent.com/kimizuy/b5c1a148b44f3ca52b6791c8f5b99079/raw/install.sh | bash
# The repository is private, so git clone will prompt for GitHub credentials.
set -euo pipefail
REPO_URL="https://github.com/kimizuy/dotfiles.git"
DOTFILES_DIR="$HOME/Documents/dev/dotfiles"
# ---------- 1. Xcode Command Line Tools ----------
if ! xcode-select -p &>/dev/null; then
echo "Installing Xcode Command Line Tools..."
xcode-select --install
echo "Waiting for Xcode CLT installation to complete..."
until xcode-select -p &>/dev/null; do
sleep 5
done
echo "Xcode CLT installed."
else
echo "Xcode CLT already installed."
fi
# ---------- 2. Clone (or update) dotfiles ----------
mkdir -p "$(dirname "$DOTFILES_DIR")"
if [ -d "$DOTFILES_DIR/.git" ]; then
echo "Dotfiles already cloned. Pulling latest changes..."
git -C "$DOTFILES_DIR" pull
else
echo "Cloning dotfiles (private repo — GitHub will prompt for credentials)..."
git clone "$REPO_URL" "$DOTFILES_DIR"
fi
# ---------- 3. Hand off to bootstrap.sh ----------
exec bash "$DOTFILES_DIR/setup/bootstrap.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment