-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·74 lines (62 loc) · 2.4 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
69
70
71
72
73
74
#!/bin/bash
unset ZSH
function run()
{
echo "$@"
eval "$@"
}
self_dir=$(cd -- "$(dirname "$0")" > /dev/null 2>&1; pwd -P)
# oh my zsh
echo "########################################################"
echo "Setting up oh my zsh"
echo "########################################################"
OMZ_DIR=${self_dir}/zsh/.config/oh-my-zsh
rm -rf ${OMZ_DIR}
# mkdir -p zsh/.config
ZSH=${OMZ_DIR} sh -c \
"$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" \
"" \
--unattended
# powerlevel10k
echo "########################################################"
echo "Setting up powerlover10k"
echo "########################################################"
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${OMZ_DIR}/custom/themes/powerlevel10k
# tpm
# tmux 처음 실행시 <leader>I 를 이용해서 .config/tmux/tmux.conf의 플러그인 설치 필요
# tpm은 수동으로 설치
echo "########################################################"
echo "Setting up tpm (tmux plugin manager)"
echo "########################################################"
TMUX_DIR=${self_dir}/tmux/.config/tmux
rm -rf ${TMUX_DIR}/plugins
git clone https://github.com/tmux-plugins/tpm ${TMUX_DIR}/plugins/tpm
# 기존에 설치되어 있을지도 모르는 것들을 제거
echo "########################################################"
echo "Cleaning up installations that might have been installed"
echo "########################################################"
run rm -f ~/.zshrc* # OMZ 설치시 만들어준 .zshrc제거 (추후 stow로 zshrc 설치할 것임)
run rm -rf ~/.config/nvim
run rm -rf ~/.config/oh-my-zsh
run rm -rf ~/.oh-my-zsh
run rm -rf ~/.config/tmux
run rm -rf ~/.tmux
run rm -rf ~/.tmux.conf
run rm -rf ~/.local/share/nvim
for f in local/.local/bin/*;do
run rm -f ~/.local/bin/$(basename $f)
done
if [ "$(uname)" == "Linux" ];then
echo "########################################################"
echo "Installing latest nvim"
echo "########################################################"
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
rm -rf ~/.local/nvim-linux64
tar -C ~/.local -xzf nvim-linux64.tar.gz
rm -f nvim-linux64.tar.gz
fi
# GNU stow 로 링크!
echo "########################################################"
echo "Stow!!!"
echo "########################################################"
run stow nvim zsh tmux local