-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapply.sh
executable file
·36 lines (23 loc) · 1.03 KB
/
apply.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
#!/bin/bash
set -eu
DOTFILES_PATH=$(cd $(dirname $0); pwd)
for f in .??*; do
[[ $f == ".git" ]] && continue
[[ $f == ".ssh" ]] && continue
[[ $f == ".gitignore" ]] && continue
ln -sfnv $DOTFILES_PATH/$f ~/$f
done
ln -sfnv $DOTFILES_PATH/.ssh/config ~/.ssh/config
ln -sfnv $DOTFILES_PATH/.ssh/config.d ~/.ssh/config.d
# Install tmux tpm if it's missed
TPM_PATH=~/.tmux/plugins/tpm
[[ ! -d $TPM_PATH ]] && git clone https://github.com/tmux-plugins/tpm $TPM_PATH
# Install oh-my-zsh
OH_MY_ZSH_PATH=~/.oh-my-zsh
[[ ! -d $OH_MY_ZSH_PATH ]] && sh -c "$(curl -fsSL https://install.ohmyz.sh/)"
# Install zsh-syntax-highlighting
ZSH_SYNTAX_HIGHLIGHTING_PATH=~/.zsh/zsh-syntax-highlighting
[[ ! -d $ZSH_SYNTAX_HIGHLIGHTING_PATH ]] && git clone https://github.com/zsh-users/zsh-syntax-highlighting $ZSH_SYNTAX_HIGHLIGHTING_PATH
# Install zsh-autosuggestions
ZSH_AUTOSUGGESTIONS_PATH=~/.zsh/zsh-autosuggestions
[[ ! -d $ZSH_AUTOSUGGESTIONS_PATH ]] && git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_AUTOSUGGESTIONS_PATH