-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·223 lines (190 loc) · 8.02 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
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
#!/bin/bash
# Import information regarding the current distribution
. /etc/os-release
source_directory="$(cd $(dirname ${BASH_SOURCE[0]}) && pwd)"
# ┏━╸┏━╸┏┓╻┏━╸┏━┓┏━┓╻ ┏━┓╺┳╸╻ ╻┏━╸┏━╸
# ┃╺┓┣╸ ┃┗┫┣╸ ┣┳┛┣━┫┃ ┗━┓ ┃ ┃ ┃┣╸ ┣╸
# ┗━┛┗━╸╹ ╹┗━╸╹┗╸╹ ╹┗━╸ ┗━┛ ╹ ┗━┛╹ ╹
if [ "${ID}" == "ubuntu" ]; then
sudo apt -y install git cppcheck arc-theme cifs-utils \
clang-format exuberant-ctags python3-pip \
openvpn network-manager-openvpn-gnome resolvconf \
zsh lxappearance timewarrior \
alacritty ranger ccache weechat-curses thunderbird syncthing \
git-lfs nextcloud-desktop taskwarrior tmux pass toilet \
seahorse fzf wtype pwgen
fi
# Fedora
if [ "${ID}" == "fedora" ]; then
sudo dnf -y install git cppcheck arc-theme cifs-utils \
clang-tools-extra ctags python3-pip openvpn \
network-manager-openvpn-gnome resolvconf zsh \
lxappearance timew kitty alacritty ranger ccache \
weechat thunderbird syncthing git-lfs nextcloud-client \
task tmux xrandr xset pass deadbeef light waybar \
toilet seahorse fzf ag wtype pwgen
fi
sudo pip3 install flake8 autopep8 mypy pynvim tasklib
git submodule update --init --recursive
sudo ln -s $(pwd)/scripts/backup.sh /usr/local/bin/backup.sh
# ┏━┓╻ ╻┏━┓╺┳╸
# ┣┳┛┃ ┃┗━┓ ┃
# ╹┗╸┗━┛┗━┛ ╹
if [ ! -x "$(command -v rustc)" ]; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup update
fi
# ┏┓ ┏━┓┏━┓╻ ╻
# ┣┻┓┣━┫┗━┓┣━┫
# ┗━┛╹ ╹┗━┛╹ ╹
if [[ ! -d ${HOME}/.bashrc ]] ; then
ln -s ${source_directory}/bashrc ${HOME}/.bashrc
else
echo "${HOME}/.bashrc : this file already exists"
fi
# ╺━┓┏━┓╻ ╻
# ┏━┛┗━┓┣━┫
# ┗━╸┗━┛╹ ╹
if [[ ! -d ${HOME}/.zprezto ]] ; then
ln -s ${source_directory}/zprezto ${HOME}/.zprezto
cd ${HOME}/.zprezto
pushd runcoms
for rcfile in $(ls z*); do
ln -s "$(pwd)/${rcfile}" "${HOME}/.${rcfile}"
done
popd
cd ${source_directory}
chsh -s /bin/zsh
else
echo "${HOME}/.zprezto : this directory already exists"
fi
# ╻┏━┓
# ┃╺━┫
# ╹┗━┛
if [ ! -d ${HOME}/.config/i3 ] ; then
ln -s ${source_directory}/i3 ${HOME}/.config/i3
cd i3
./install.sh
cd ${source_directory}
else
echo "${HOME}/.config/i3 : this directory already exists"
fi
# ┏━┓┏━┓┏━╸╻ ┏━┓╺┳╸╻ ╻┏━╸┏━╸
# ┣┳┛┃ ┃┣╸ ┃ ┗━┓ ┃ ┃ ┃┣╸ ┣╸
# ╹┗╸┗━┛╹ ╹ ┗━┛ ╹ ┗━┛╹ ╹
cargo install ripgrep rofi-taskwarrior
sudo cp ../rofi-pass/rofi-pass /usr/local/bin/rofi-pass
if [ ! -d ${HOME}/.config/rofi-pass ] ; then
ln -s ${source_directory}/rofi-pass ${HOME}/.config/rofi-pass
else
echo "${HOME}/.config/rofi-pass : this directory already exists"
fi
# ┏━┓╻ ╻┏━┓╻ ╻
# ┗━┓┃╻┃┣━┫┗┳┛
# ┗━┛┗┻┛╹ ╹ ╹
if [ ! -d ${HOME}/.config/sway ] ; then
ln -s ${source_directory}/sway ${HOME}/.config/sway
cd sway
./install.sh
cd ${source_directory}
else
echo "${HOME}/.config/sway : this directory already exists"
fi
# ╻ ╻┏━┓╻ ╻┏┓ ┏━┓┏━┓
# ┃╻┃┣━┫┗┳┛┣┻┓┣━┫┣┳┛
# ┗┻┛╹ ╹ ╹ ┗━┛╹ ╹╹┗╸
if [ ! -d ${HOME}/.config/waybar ] ; then
ln -s ${source_directory}/waybar ${HOME}/.config/waybar
else
echo "${HOME}/.config/waybar : this directory already exists"
fi
# ╻ ╻╻┏┳┓
# ┃┏┛┃┃┃┃
# ┗┛ ╹╹ ╹
if [ ! -f ${HOME}/.vimrc ] ; then
ln -s ${source_directory}/vim/vimrc ${HOME}/.vimrc
else
echo "${HOME}/.vimrc : this file alreay exists"
fi
if [ ! -d ${HOME}/.vim ] ; then
ln -s ${source_directory}/vim ${HOME}/.vim
mkdir -p ${HOME}/.vimundo
else
echo "${HOME}/.vim : this directory already exists"
fi
#
# tmux
#
if [ ! -d ${HOME}/.tmux ] ; then
ln -s ${source_directory}/tmux ${HOME}/.tmux
else
echo "${HOME}/.tmux : this directory already exists"
fi
if [ ! -f ${HOME}/.tmux.conf ] ; then
ln -s ${source_directory}/tmux.conf ${HOME}/.tmux.conf
else
echo "${HOME}/.tmux.conf : this file already exists"
fi
# ┏━┓┏━┓╻ ╻┏━╸┏━┓╻ ╻┏┓╻┏━╸ ┏━╸┏━┓┏┓╻╺┳╸┏━┓
# ┣━┛┃ ┃┃╻┃┣╸ ┣┳┛┃ ┃┃┗┫┣╸ ┣╸ ┃ ┃┃┗┫ ┃ ┗━┓
# ╹ ┗━┛┗┻┛┗━╸╹┗╸┗━╸╹╹ ╹┗━╸ ╹ ┗━┛╹ ╹ ╹ ┗━┛
# cd /tmp
# git clone https://github.com/powerline/fonts.git
# cd fonts && ./install.sh
# cd ${source_directory}
# ╻ ╻┏━┓┏━╸┏━┓┏━╸┏━╸┏┓╻┏━┓┏━┓╻ ╻┏━╸┏━┓
# ┏╋┛┗━┓┃ ┣┳┛┣╸ ┣╸ ┃┗┫┗━┓┣━┫┃┏┛┣╸ ┣┳┛
# ╹ ╹┗━┛┗━╸╹┗╸┗━╸┗━╸╹ ╹┗━┛╹ ╹┗┛ ┗━╸╹┗╸
if [ ! -f ${HOME}/.xscreensaver ] ; then
ln -s ${source_directory}/xscreensaver ${HOME}/.xscreensaver
else
echo "${HOME}/.xscreensaver : this file alreay exists"
fi
# ╻ ╻┏━┓┏━╸┏━┓┏━┓╻ ╻┏━┓┏━╸┏━╸┏━┓
# ┏╋┛┣┳┛┣╸ ┗━┓┃ ┃┃ ┃┣┳┛┃ ┣╸ ┗━┓
# ╹ ╹╹┗╸┗━╸┗━┛┗━┛┗━┛╹┗╸┗━╸┗━╸┗━┛
if [ ! -f ${HOME}/.Xresources ] ; then
ln -s ${source_directory}/Xresources ${HOME}/.Xresources
else
echo "${HOME}/.Xresources : this file alreay exists"
fi
# ┏━┓┏━┓┏┓╻┏━╸┏━╸┏━┓
# ┣┳┛┣━┫┃┗┫┃╺┓┣╸ ┣┳┛
# ╹┗╸╹ ╹╹ ╹┗━┛┗━╸╹┗╸
if [ ! -f ${HOME}/.config/ranger ] ; then
ln -s ${source_directory}/ranger ${HOME}/.config/ranger
else
echo "${HOME}/.config/ranger : this file alreay exists"
fi
# ┏━┓┏━┓┏━┓┏━╸╻╻ ┏━╸
# ┣━┛┣┳┛┃ ┃┣╸ ┃┃ ┣╸
# ╹╹ ╹┗╸┗━┛╹ ╹┗━╸┗━╸
rm ${HOME}/.profile
ln -s ${source_directory}/profile ${HOME}/.profile
# ┏━╸╺┳┓┏┓ ╺┳┓┏━┓┏━┓╻ ╻┏┓ ┏━┓┏━┓┏━┓╺┳┓
# ┃╺┓ ┃┃┣┻┓╺━╸ ┃┃┣━┫┗━┓┣━┫┣┻┓┃ ┃┣━┫┣┳┛ ┃┃
# ┗━┛╺┻┛┗━┛ ╺┻┛╹ ╹┗━┛╹ ╹┗━┛┗━┛╹ ╹╹┗╸╺┻┛
rm ${HOME}/.gdbinit
ln -s ${source_directory}/gdb-dashboard/.gdbinit ${HOME}/.gdbinit
# ╺┳╸╻┏┳┓┏━╸╻ ╻┏━┓┏━┓┏━┓╻┏━┓┏━┓ ┏┓ ╺┳╸┏━┓┏━┓╻┏ ╻ ╻┏━┓┏━┓┏━┓╻┏━┓┏━┓
# ┃ ┃┃┃┃┣╸ ┃╻┃┣━┫┣┳┛┣┳┛┃┃ ┃┣┳┛ ┃╺╋╸ ┃ ┣━┫┗━┓┣┻┓┃╻┃┣━┫┣┳┛┣┳┛┃┃ ┃┣┳┛
# ╹ ╹╹ ╹┗━╸┗┻┛╹ ╹╹┗╸╹┗╸╹┗━┛╹┗╸ ┗━┛ ╹ ╹ ╹┗━┛╹ ╹┗┻┛╹ ╹╹┗╸╹┗╸╹┗━┛╹┗╸
rm ${HOME}/.taskrc
ln -s ${source_directory}/taskwarrior/taskrc ${HOME}/.taskrc
if [ ! -x "$(command -v rofi-taskwarrior)" ]; then
cd /tmp/
git clone https://github.com/nyarly/rofi-taskwarrior.git
cargo install --path rofi-taskwarrior
cd ${source_directory}
fi
if [ ! -x "$(command -v taskwarrior-tui)" ]; then
cd /tmp/
git clone https://github.com/kdheepak/taskwarrior-tui/
cargo install --path taskwarrior-tui
cd ${source_directory}
fi
# ╺┳┓┏━╸┏━┓╺┳┓┏┓ ┏━╸┏━╸┏━╸
# ┃┃┣╸ ┣━┫ ┃┃┣┻┓┣╸ ┣╸ ┣╸
# ╺┻┛┗━╸╹ ╹╺┻┛┗━┛┗━╸┗━╸╹
rm -f ${HOME}/.config/deadbeef
ln -s ${source_directory}/deadbeef ${HOME}/.config/deadbeef