-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·36 lines (25 loc) · 1.09 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
DOTFILES=$(cd $(dirname $0); pwd)
echo "Entrypoint: $DOTFILES"
echo "Pulling submodules"
git submodule update --init --recursive --remote
echo "Updating zsh"
[ -e $HOME/.zprofile ] && mv $HOME/.zprofile $HOME/.zprofile.bak
echo "export DOTFILES=$DOTFILES" >> $HOME/.zprofile
echo "ZDOTDIR=\$DOTFILES/zsh" >> $HOME/.zprofile
[ ! -d $HOME/.config/.bak ] && mkdir $HOME/.config/.bak
echo "Updating nvim"
[ -d $HOME/.config/nvim ] && mv $HOME/.config/nvim $HOME/.config/.bak/nvim
ln -s $DOTFILES/nvim $HOME/.config/nvim
echo "Updating ghostty"
[ -d $HOME/.config/ghostty ] && mv $HOME/.config/ghostty $HOME/.config/.bak/ghostty
ln -s $DOTFILES/ghostty $HOME/.config/ghostty
echo "Updating kitty"
[ -d $HOME/.config/kitty ] && mv $HOME/.config/kitty $HOME/.config/.bak/kitty
ln -s $DOTFILES/kitty $HOME/.config/kitty
echo "Updating tmux"
[ -d $HOME/.config/tmux ] && mv $HOME/.config/tmux $HOME/.config/.bak/tmux
ln -s $DOTFILES/tmux $HOME/.config/tmux
echo "Moving old .zshrc"
[ -e $HOME/.zshrc ] && mv $HOME/.zshrc $HOME/.zshrc.bak
echo "Old dotfiles are moved to $HOME/.config/.bak"
echo "Reload your shell"