-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·49 lines (41 loc) · 1.18 KB
/
install.sh
File metadata and controls
executable file
·49 lines (41 loc) · 1.18 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
#!/usr/bin/env bash
# Dotfiles install script — symlinks all configs into place
# Run from ~/dotfiles: ./install.sh
set -e
DOTFILES="$( cd "$(dirname "$0")" && pwd )"
link() {
local src="$1" dst="$2"
mkdir -p "$(dirname "$dst")"
if [ -e "$dst" ] && [ ! -L "$dst" ]; then
echo " BACKUP $dst -> $dst.bak"
mv "$dst" "$dst.bak"
fi
ln -sfn "$src" "$dst"
echo " LINKED $dst"
}
echo ""
echo "==> Fish"
link "$DOTFILES/fish/config.fish" "$HOME/.config/fish/config.fish"
echo ""
echo "==> Git"
link "$DOTFILES/git/.gitconfig" "$HOME/.gitconfig"
link "$DOTFILES/git/.gitignore_global" "$HOME/.gitignore_global"
echo ""
echo "==> VSCode"
VSCODE_DIR="$HOME/Library/Application Support/Code/User"
mkdir -p "$VSCODE_DIR"
link "$DOTFILES/vscode/settings.json" "$VSCODE_DIR/settings.json"
echo ""
echo "==> Zed"
ZED_DIR="$HOME/.config/zed"
mkdir -p "$ZED_DIR"
link "$DOTFILES/zed/settings.json" "$ZED_DIR/settings.json"
echo ""
echo "==> Claude"
CLAUDE_DIR="$HOME/.claude"
mkdir -p "$CLAUDE_DIR"
if [ -f "$DOTFILES/claude/settings.json" ]; then
link "$DOTFILES/claude/settings.json" "$CLAUDE_DIR/settings.json"
fi
echo ""
echo "Done. Open a new terminal to apply fish changes."