-
Notifications
You must be signed in to change notification settings - Fork 3
/
install
executable file
·135 lines (111 loc) · 3.41 KB
/
install
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#!/bin/bash
##################################
# DOT FILES INSTALLER
##################################
# Git
if ! command -v git &> /dev/null
then
echo "X GIT could not be found."
exit 1
fi
# fzf
if ! command -v fzf &> /dev/null
then
echo "X FZF could not be found."
exit 1
fi
# delta
if ! command -v delta &> /dev/null
then
echo "X Delta could not be found."
exit 1
fi
# Vim
if ! command -v vim &> /dev/null
then
echo "X VIM could not be found."
else
echo "> Installing VIM settings"
rm -rf "$HOME/.vim" && \
cp -a ./.vim "$HOME/"
# Vim 8 Packages:
mkdir -p "$HOME/.vim/pack/themes/start"
mkdir -p "$HOME/.vim/pack/plugins/start"
# dracula (https://github.com/dracula/vim)
git clone git@github.com:dracula/vim.git ~/.vim/pack/themes/start/dracula
# vim-go (https://github.com/fatih/vim-go)
git clone git@github.com:fatih/vim-go.git ~/.vim/pack/plugins/start/vim-go
# vim-airline (https://github.com/vim-airline/vim-airline)
git clone git@github.com:vim-airline/vim-airline.git ~/.vim/pack/plugins/start/vim-airline
git clone git@github.com:vim-airline/vim-airline-themes.git ~/.vim/pack/plugins/start/vim-airline-themes
# vim-fugitive (https://github.com/tpope/vim-fugitive)
git clone git@github.com:tpope/vim-fugitive.git ~/.vim/pack/plugins/start/vim-fugitive
echo "> VIM settings installed :)"
fi
# NeoVim
if ! command -v nvim &> /dev/null
then
echo "X NVIM could not be found."
else
echo "> Installing NVIM settings"
if [ ! -d "$HOME/.config/nvim" ]
then
mkdir -p "$HOME/.config/nvim"
fi
rm -rf "$HOME/.config/nvim" && \
cp -a ./nvim "$HOME/.config"
echo "> NVIM settings installed :)"
fi
# Git
echo "> Installing GIT settings"
rm -rf "$HOME/.githooks_global" && \
cp -a ./git/.git* "$HOME/"
echo "> GIT settings installed :)"
# tmux
if ! command -v tmux &> /dev/null
then
echo "X TMUX could not be found."
else
echo "> Installing TMUX settings"
cp -a ./tmux/.tmux.conf "$HOME/.tmux.conf"
echo "> TMUX settings installed :)"
fi
# tmate
if ! command -v tmate &> /dev/null
then
echo "X TMATE could not be found."
else
echo "> Installing TMATE settings"
cp -a ./tmate/.tmate.conf "$HOME/.tmate.conf"
echo "> TMATE settings installed :)"
fi
# ctags
if ! command -v ctags &> /dev/null
then
echo "X CTAGS could not be found."
else
echo "> Installing CTAGS settings"
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
cp .ctags/.linux-ctags "$HOME/.ctags"
elif [[ "$OSTYPE" == "darwin"* ]]; then
cp .ctags/.macos-ctags "$HOME/.ctags"
fi
echo "> CTAGS settings installed :)"
fi
# Shell extras
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
cp ./sh/.linux-gnu-custom-settings "$HOME/" && \
grep -qF "source $HOME/.linux-gnu-custom-settings" "$HOME/.zshrc" || printf "\n# %s custom shell:\nsource %s/.linux-gnu-custom-settings" "$USER" "$HOME" >> "$HOME/.zshrc"
elif [[ "$OSTYPE" == "darwin"* ]]; then
cp ./sh/.darwin-custom-settings "$HOME/" && \
grep -qF "source $HOME/.darwin-custom-settings" "$HOME/.zshrc" || printf "\n# %s custom shell:\nsource %s/.darwin-custom-settings" "$USER" "$HOME" >> "$HOME/.zshrc"
fi
# Binaries
rm -rf "$HOME/.my-binaries" && \
cp -a ./bins "$HOME/.my-binaries"
# powerline/fonts (https://github.com/powerline/fonts)
git clone git@github.com:powerline/fonts.git --depth=1 $HOME/powerline-fonts
$SHELL $HOME/powerline-fonts/install.sh
rm -rf $HOME/powerline-fonts
# Finish!
exit 0