-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·38 lines (28 loc) · 986 Bytes
/
install
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
#!/usr/bin/env bash
DOTFILES=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
# Remove existing directories/files
if [ -d "$HOME/.config/nvim" ]; then
rm -rf "$HOME/.config/nvim"
fi
if [ -f "$HOME/.tmux.conf" ]; then
rm -rf "$HOME/.tmux.conf"
fi
if [ -d "$HOME/.config/wezterm" ]; then
rm -rf "$HOME/.config/wezterm"
fi
if [ -d "$HOME/.tmux" ]; then
rm -rf "$HOME/.tmux"
fi
if [ -d "$HOME/.local/share/nvim/site/pack/plugins/start/vim-go" ]; then
rm -rf "$HOME/.local/share/nvim/site/pack/plugins/start/vim-go"
fi
if [ ! -d "$HOME/.config" ]; then
mkdir -p "$HOME/.config"
fi
# Create symbolic links
ln -s "$DOTFILES/nvim" "$HOME/.config/nvim"
ln -s "$DOTFILES/tmux/.tmux.conf" "$HOME/.tmux.conf"
ln -s "$DOTFILES/wezterm" "$HOME/.config/wezterm"
# Clone repositories
git clone https://github.com/fatih/vim-go.git "$HOME/.local/share/nvim/site/pack/plugins/start/vim-go" || true
git clone https://github.com/tmux-plugins/tpm "$HOME/.tmux/plugins/tpm" || true