-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·37 lines (31 loc) · 994 Bytes
/
bootstrap.sh
File metadata and controls
executable file
·37 lines (31 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
# Bootstrap script - run once for initial system setup
cd "$(dirname "$0")"
echo "=== Dotfiles Bootstrap ==="
echo "This script performs one-time system setup."
echo
# install Xcode Command Line Tools
if ! xcode-select -p &>/dev/null; then
echo "Installing Xcode Command Line Tools..."
xcode-select --install
echo "Please complete the Xcode installation and re-run this script."
exit 1
else
echo "✓ Xcode Command Line Tools already installed"
fi
# install Homebrew
if [ ! -x "$(which brew)" ]; then
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "✓ Homebrew installed"
else
echo "✓ Homebrew already installed"
fi
# add Homebrew to PATH for current session
if [ -x /opt/homebrew/bin/brew ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -x /usr/local/bin/brew ]; then
eval "$(/usr/local/bin/brew shellenv)"
fi
echo
echo "=== Bootstrap Complete ==="