-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·286 lines (240 loc) · 7 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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
#!/bin/bash
# This file should have permission to be executed.
# Just run `chmod +x install.sh` to do so.
# You should also have root access of the new computer
UPDATE_PACKAGES="sudo apt update"
MANAGER_INSTALL="apt install"
DEB_INSTALL="dpkg -i"
read -p 'Update packages? (Y/n) ' updatepackages
# read -p 'Install Atom? (Y/n) ' installatom
read -p 'Install Brave Browser? (Y/n) ' installbrave
read -p 'Install Discord? (Y/n) ' installdiscord
read -p 'Install Kitty? (Y/n) ' installkitty
read -p 'Install Modern Unix scripts? (Y/n) ' installmu
read -p 'Install Neofetch? (Y/n) ' installneofetch
read -p 'Install Vim/Neovim? (Y/n) ' installvimnvim
read -p 'Install NVM? (Y/n) ' installnode
read -p 'Install Steam? (Y/n) ' installsteam
read -p 'Install Tmux? (Y/n) ' installtmux
# read -p 'Install Tilix? (Y/n) ' installtilix
read -p 'Install GNOME Tweaks? (Y/n) ' installtweaks
read -p 'Install zsh? (Y/n) ' installzsh
if [[ $updatepackages == 'Y' || $updatepackages == 'y' ]]; then
echo 'Updating packages...'
$UPDATE_PACKAGES
else
echo 'Skipping updating packages...'
fi
# Atom
if [[ $installatom == 'Y' || $installatom == 'y' ]]; then
echo 'Installing Atom...'
sudo ${MANAGER_INSTALL} atom -y
python3 atom/install.py
# symlink for config.cson
rm $HOME/.atom/config.cson
ln -s $HOME/.dotfiles/atom/config.cson $HOME/.atom/config.cson
echo "Atom config.cson symlink complete!"
if [[ -d "$HOME/.atom/packages/script/lib/grammars" ]]; then
cp $HOME/.dotfiles/atom/python.js $HOME/.atom/packages/script/lib/grammars
fi
else
echo 'Skipping Atom install.'
fi
# Brave Browser
if [[ $installbrave == 'Y' || $installbrave == 'y' ]]; then
echo 'Installing Brave Browser...'
sudo apt install apt-transport-https curl
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update
sudo ${MANAGER_INSTALL} brave-browser -y
else
echo 'Skipping Brave Browser install.'
fi
# Discord
if [[ $installdiscord == 'Y' || $installdiscord == 'y' ]]; then
echo 'Installing Discord...'
sudo ${MANAGER_INSTALL} discord -y
else
echo 'Skipping Discord install.'
fi
# Eclipse
# read -p 'Install Eclipse? (Y/n) ' installeclipse
if [[ $installeclipse == 'Y' || $installeclipse == 'y' ]]; then
echo 'Installing Eclipse...'
sudo ${MANAGER_INSTALL} eclipse -y
else
echo 'Skipping Eclipse install.'
fi
# Kitty
if [[ $installkitty == 'Y' || $installkitty == 'y' ]]; then
echo 'Installing Kitty...'
bash ./scripts/kitty.sh
else
echo 'Skipping Kitty install.'
fi
# Modern Unix
if [[ $installmu == 'Y' || $installmu == 'y' ]]; then
echo 'Installing Modern Unix...'
# bat
sudo ${MANAGER_INSTALL} bat -y
# git-delta
bash ./scripts/git-delta.sh
# htop
sudo ${MANAGER_INSTALL} htop -y
# lsd
bash ./scripts/lsd.sh
# tree
sudo ${MANAGER_INSTALL} tree -y
else
echo 'Skipping Modern Unix install.'
fi
# GNU Nano
# read -p 'Install GNU Nano? (Y/n) ' installnano
# if [ $installnano == 'Y' ]
# then
# echo 'Installing Nano...'
# sudo ${MANAGER_INSTALL} nano -y
# else
# echo 'Skipping Nano install.'
# fi
# Neofetch
if [[ $installneofetch == 'Y' || $installneofetch == 'y' ]]; then
echo 'Installing Neofetch...'
sudo ${MANAGER_INSTALL} neofetch -y
else
echo 'Skipping Neofetch install.'
fi
# Neovim
if [[ $installvimnvim == 'Y' || $installvimnvim == 'y' ]]; then
read -p 'Install Neovim? (Y/n) ' installneovim
if [[ $installneovim == 'Y' || $installneovim == 'y' ]]; then
echo 'Installing Neovim...'
bash ./scripts/code-minimap.sh
bash ./scripts/nvim.sh
else
echo 'Installing vim...'
bash ./scripts/code-minimap.sh
bash ./scripts/vim.sh
fi
else
echo "Skpping editor install"
fi
# NVM
if [[ $installnode == 'Y' || $installnode == 'y' ]]; then
echo 'Installing NVM...'
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
nvm install node
else
echo 'Skipping NVM install.'
fi
# Steam
if [[ $installsteam == 'Y' || $installsteam == 'y' ]]; then
echo 'Installing Steam...'
sudo ${MANAGER_INSTALL} steam -y
else
echo 'Skipping Steam install.'
fi
# Tmux
if [[ $installtmux == 'Y' || $installtmux == 'y' ]]; then
echo 'Installing Tmux...'
bash ./scripts/tmux.sh
else
echo 'Skipping Tmux install...'
fi
# Tilix
if [[ $installtilix == 'Y' || $installtilix == 'y' ]]; then
echo 'Installing Tilix...'
sudo ${MANAGER_INSTALL} tilix -y
sudo update-alternatives --config x-terminal-emulator
else
echo 'Skipping Tilix install.'
fi
# GNOME Tweaks
if [[ $installtweaks == 'Y' || $installtweaks == 'y' ]]; then
echo 'Installing GNOME Tweaks...'
sudo ${MANAGER_INSTALL} gnome-tweaks -y
else
echo 'Skipping GNOME Tweaks install.'
fi
if [ ! command -v snap &> /dev/null ]; then
# Snap
read -p 'Install snap? (Y/n) ' installsnap
if [ $installsnap == 'Y' || $installsnap == 'y' ]; then
sudo $MANAGER_INSTALL snapd
fi
if [ ! command -v snap &> /dev/null ]; then
# Slack
read -p 'Install Slack? (Y/n) ' installslack
if [ $installslack == 'Y' || $installslack == 'y' ]
then
echo 'Installing Slack...'
sudo snap install slack
else
echo 'Skipping Slack install.'
fi
# Bitwarden
read -p 'Install Bitwarden? (Y/n) ' installbitwarden
if [ $installbitwarden == 'Y' || $installbitwarden == 'y' ]
then
echo 'Installing Bitwarden...'
sudo snap install bitwarden
else
echo 'Skipping Bitwarden install.'
fi
# FromScratch
read -p 'Install FromScratch? (Y/n) ' installfromscratch
if [ $installfromscratch == 'Y' || $installfromscratch == 'y' ]
then
echo 'Installing FromScratch...'
sudo snap install fromscratch
else
echo 'Skipping FromScratch install.'
fi
fi
# Zoom
read -p 'Install Zoom? (Y/n) ' installzoom
if [ $installzoom == 'Y' || $installzoom == 'y' ]
then
echo 'Installing Zoom...'
sudo snap install zoom
else
echo 'Skipping Zoom install.'
fi
fi
# symlink for gitconfig
rm $HOME/.gitconfig
ln -s $HOME/.dotfiles/git/gitconfig $HOME/.gitconfig
echo "gitconfig symlink complete!"
# installation of zsh, symlink for zsh/bash config files
if [[ $installzsh == 'Y' || $installzsh == 'y' ]]; then
echo "Using zsh..."
bash ./scripts/zsh.sh
else
echo "Using bash..."
# Compatitbility with Tilix
if [[ $installtilix ]]; then
# symlink for bashrc
sudo ln -s /etc/profile.d/vte-2.91.sh /etc/profile.d/vte.sh
rm $HOME/.bashrc
ln -s $HOME/.dotfiles/bash/bashrctilix $HOME/.bashrc
echo "bashrc symlink complete!"
else
# symlink for bashrc
rm $HOME/.bashrc
ln -s $HOME/.dotfiles/bash/bashrc $HOME/.bashrc
echo "bashrc symlink complete!"
fi
if [ -e "$HOME/.bash_profile" ];
then
# symlink for bash_profile
rm $HOME/.bash_profile
ln -s $HOME/.dotfiles/bash/profile $HOME/.bash_profile
echo "bash_profile symlink complete!"
else
# symlink for profile
rm $HOME/.profile
ln -s $HOME/.dotfiles/bash/profile $HOME/.profile
echo "profile symlink complete!"
fi
fi