-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
executable file
·68 lines (54 loc) · 2.08 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
68
#!/bin/zsh
echo "You're about to install «dotfiles»‼️"
read -k 1 "answer?Proceed(y/n)❓"
if ! [[ "$answer" =~ [yY] ]]; then
exit 0;
fi
echo -e "\n🚧 removing current dotfiles"
rm -f ~/.zshrc
rm -f ~/.bashrc
rm -f ~/.bash_profile
rm -f ~/.gitconfig
rm -f ~/.gitattributes
rm -f ~/.gitignore
rm -f ~/.bash_profile
rm -rf ~/dotfiles
rm -rf ~/.dotfiles
rm -rf ~/.antigen
rm -rf ~/.tmux.conf
rm -rf ~/.tmux/plugins
cd ~
echo "⬇️ downloading latest version"
# git pull --unshallow
# to get all revisions
git clone --depth 1 -b main --recursive https://github.com/gko/dotfiles
echo "⬇️ installing tmux plugins"
# https://github.com/tmux-plugins/tpm/issues/193
mkdir -p ~/.tmux/plugins
git clone --depth 1 https://github.com/tmux-plugins/tmux-sensible ~/.tmux/plugins/tmux-sensible
git clone --depth 1 https://github.com/tmux-plugins/tmux-resurrect ~/.tmux/plugins/tmux-resurrect
git clone --depth 1 https://github.com/tmux-plugins/tmux-continuum ~/.tmux/plugins/tmux-continuum
git clone --depth 1 https://github.com/tmux-plugins/tmux-yank ~/.tmux/plugins/tmux-yank
curl https://raw.githubusercontent.com/chriskempson/base16-xresources/master/xresources/base16-default-dark-256.Xresources >> ~/.Xresources
mv ~/dotfiles ~/.dotfiles
ln -s ~/.dotfiles/.bashrc ~/.bashrc
ln -s ~/.dotfiles/.bash_profile ~/.bash_profile
ln -s ~/.dotfiles/.zshrc ~/.zshrc
ln -s ~/.dotfiles/.tmux.conf ~/.tmux.conf
# dev session with vim and 3 split layout
ln -s ~/.dotfiles/dev ~/.tmux/dev
ln -s ~/.dotfiles/.gitconfig ~/.gitconfig
ln -s ~/.dotfiles/.gitignore ~/.gitignore
ln -s ~/.dotfiles/.gitattributes ~/.gitattributes
# install gh config https://cli.github.com/
mkdir -p ~/.config/gh
ln -s ~/.dotfiles/gh-config.yml ~/.config/gh/config.yml
echo "⚙️ installing antigen"
curl -L git.io/antigen > ~/.dotfiles/antigen.zsh
echo -e "\nDone!\n\nTo install local config files do following: \n\n\
ln -sf ~/.dotfiles/local/.*.local ~/\n\
cd ~/.dotfiles \n\
git untrack local/.gitconfig.user.local\n\n\
or \n\n\
cp ~/.dotfiles/local/.*.local ~/\
\n\nmore info here: https://github.com/gko/dotfiles/tree/main/local"