forked from alajpie/dotki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·59 lines (43 loc) · 1.33 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
#!/bin/bash
exec 3>&1
# start subshell
(
# get the absolute path of the script
DOTKI="$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ~
ln -s $DOTKI/zshrc .zshrc
# sudo chsh $(whoami) -s $(which zsh)
mkdir -p .config/nvim
ln -s $DOTKI/init.vim .config/nvim/init.vim
mkdir -p .config/nvim/autoload
if ! [[ -f .config/nvim/autoload/plug.vim ]]; then
curl https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -#Lo .config/nvim/autoload/plug.vim
if [[ -x "$(command -v nvim)" ]]; then
nvim +PlugInstall +qa
fi
fi
ln -s $DOTKI/gitconfig .gitconfig
ln -s $DOTKI/tmux.conf .tmux.conf
if ! [[ -x "$(command -v exa)" ]]; then
echo "installing exa" >&3
cargo install exa
fi
if ! [[ -x "$(command -v zoxide)" ]]; then
echo "installing cargo" >&3
cargo install zoxide
fi
if [[ ! -d $ZSH/custom/plugins/zsh-nvm ]]; then
echo "installing zsh-nvm" >&3
git clone https://github.com/lukechilds/zsh-nvm $ZSH/custom/plugins/zsh-nvm
fi
if [[ ! -d "$ZSH/custom/plugins/zsh-syntax-highlighting" ]]; then
echo "installing zsh-highlighting-syntax" >&3
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH/custom/plugins/zsh-syntax-highlighting
fi
if ! [[ -x "$(command -v starship)" ]]; then
echo "installing starship" >&3
sh -c "$(curl -fsSL https://starship.rs/install.sh)" >&3
fi
) |
exec zsh
echo "done!"