-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·49 lines (35 loc) · 1.25 KB
/
Copy pathinstall
File metadata and controls
executable file
·49 lines (35 loc) · 1.25 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
#!/bin/bash
DOT=$HOME/dotfiles
CONFIG=$HOME/.config
XCODE_THEMES=$HOME/Library/Developer/Xcode/UserData/FontAndColorThemes
set -e
step() {
printf '\033[1;34m→\033[0m \033[1m%s...\033[0m\n' "$1"
}
trap 'printf "\033[1;31m→ Failed\033[0m\n"' ERR
step "Symlinking dotfiles"
mkdir -p "$CONFIG"
ln -sf "$DOT/ghostty" "$CONFIG"
ln -sf "$DOT/nvim" "$CONFIG"
ln -sf "$DOT/starship/starship.toml" "$CONFIG/starship.toml"
mkdir -p "$CONFIG/zed"
ln -sf "$DOT/zed/settings.json" "$CONFIG/zed/settings.json"
ln -sf "$DOT/zed/keymap.json" "$CONFIG/zed/keymap.json"
mkdir -p "$XCODE_THEMES"
for theme in "$DOT/xcode/themes/"*.xccolortheme; do
ln -sf "$theme" "$XCODE_THEMES/$(basename "$theme")"
done
ln -sf "$DOT/zsh/zshrc" "$HOME/.zshrc"
ln -sf "$DOT/git/gitconfig" "$HOME/.gitconfig"
ln -sf "$DOT/git/gitignore" "$HOME/.gitignore"
step "Installing Homebrew"
if ! command -v brew &> /dev/null; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
else
brew update -q
fi
step "Installing packages"
brew install -q neovim tree-sitter tree-sitter-cli starship ripgrep
printf '\033[1;32m→ Done\033[0m\n'