-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·72 lines (61 loc) · 1.5 KB
/
install.sh
File metadata and controls
executable file
·72 lines (61 loc) · 1.5 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env bash
# Full installation script - installs dotfiles and packages
cd "$(dirname "$0")"
echo "=== Dotfiles Installation ==="
echo
# run bootstrap if system is not set up yet
if ! command -v brew &>/dev/null || ! xcode-select -p &>/dev/null; then
echo "Running bootstrap..."
./bootstrap.sh
if [ $? -ne 0 ]; then
echo "Bootstrap failed. Please fix any issues and try again."
exit 1
fi
echo
fi
echo "✓ System bootstrapped"
echo
# sync files
echo "Syncing dotfiles..."
./sync.sh -f
echo "✓ Dotfiles synced"
# apply git config
echo
echo "Configuring git..."
./git.sh
echo "✓ Git configured"
# macos settings
echo
echo "Applying macOS settings..."
./macos.sh
echo "✓ macOS settings applied"
# homebrew
echo
echo "Installing Homebrew packages..."
brew update
brew upgrade
brew bundle
brew cleanup
echo "✓ Packages installed"
# setup brewed ZSH as default shell
BREWED_ZSH="$(brew --prefix)/bin/zsh"
if [ ! -x "$BREWED_ZSH" ]; then
echo "⚠ Brewed zsh not found - skipping shell change"
elif [ "$SHELL" != "$BREWED_ZSH" ]; then
echo "Changing default shell to brewed ZSH..."
if ! grep -q "$BREWED_ZSH" /etc/shells; then
echo "$BREWED_ZSH" | sudo tee -a /etc/shells
fi
sudo chsh -s "$BREWED_ZSH" "$USER"
echo "✓ Default shell changed (will take effect on next login)"
else
echo "✓ Already using brewed ZSH"
fi
# setup vim
echo
echo "Setting up vim..."
./vim.sh
echo "✓ Vim configured"
echo
echo "=== Installation Complete ==="
echo "Please reload your shell: exec zsh"