-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·67 lines (56 loc) · 2.28 KB
/
install.sh
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
#!/usr/bin/env zsh
REPO_DIR=$(git rev-parse --show-toplevel)
# Remove existing dotfile configs (clean slate)
rm -f "$HOME/.zshrc"
rm -f "$HOME/.config/starship.toml"
rm -rf "$HOME/.oh-my-zsh"
rm -rf "$HOME/.config/alacritty"
rm -rf "$HOME/.config/nvim"
rm -rf "$HOME/Library/Application Support/lazygit"
# Install oh-my-zsh
print -P "%F{green}Installing oh-my-zsh..."
print -P "%F{red}NOTE: INTERACTIVE PROMPT WILL APPEAR. TYPE 'exit' TO CONTINUE INSTALLATION."
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
rm -f "$HOME/.zshrc"
print -P "%F{green}oh-my-zsh installed."
# Create symlinks for dotfile configs
print -P "%F{green}Creating symlinks for dotfile configs..."
mkdir "$HOME/.config/alacritty"
ln -s "$REPO_DIR/dotfiles/.zshrc" "$HOME/.zshrc"
ln -s "$REPO_DIR/dotfiles/starship.toml" "$HOME/.config/starship.toml"
ln -s "$REPO_DIR/dotfiles/alacritty.toml" "$HOME/.config/alacritty/alacritty.toml"
ln -s "$REPO_DIR/nvim/" "$HOME/.config/nvim"
print -P "%F{green}Symlinks created."
# Install starship
print -P "%F{green}Installing starship..."
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
print -P "%F{green}starship installed."
# Install Homebrew
print -P "%F{green}Installing Homebrew..."
sh -c $(curl -fsSL "https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh")
print -P "%F{green}Homebrew installed."
# Install Homebrew apps
print -P "%F{green}Installing Homebrew apps..."
brew install awscli helm kubectx k8sec lazygit neovim ripgrep tfenv tflint terraform-docs tree-sitter
print -P "%F{green}Homebrew apps installed."
# Install Rust (dependency for Alacritty)
print -P "%F{green}Installing Rust..."
curl https://sh.rustup.rs -sSf | sh
source "$HOME/.zshrc"
print -P "%F{green}Rust installed."
# Install Alacritty
print -P "%F{green}Installing Alacritty..."
git clone [email protected]:alacritty/alacritty.git
cd alacritty
make app
cp -r target/release/osx/Alacritty.app /Applications/
cd ..
rm -rf alacritty
print -P "%F{green}Alacritty installed."
# Install Hack Nerd Font
print -P "%F{green}Installing Hack Nerd Font..."
cp "$REPO_DIR/fonts/HackNerdFontMono-Regular-Patched.ttf" "$HOME/Library/Fonts/"
print -P "%F{green}Hack Nerd Font installed."
# Confirm success
source ~/.zshrc
print -P "%F{green}\nSuccess! Installation completed."